Hi I want to use java logging API in applet, i want to use ConsoleHandler to get all the logs in my java console, also i want to have a JDialog where i will display various logging level options and then set the log level from the selected option. I dont want to use a properties file to set Log level,
how will i get it working if my package name is "com.test.applet" and all the applet classes are inside this package
Hi thanx, does any one have a working sample to set loglevel from a class and not from properties file, also security manager does not allow to set loglevel on ConsoleHandle in JApplet if it is not a secured applet
Did you happen to read the Java Logging Overview I pointed you to? Particularly the section marked "2.2 Changing the Configuration". That says "Here's a small program that dynamically adjusts the logging configuration. . ."
Joined: Aug 15, 2002
Hi thanx for the direction, i did read the document and tried that code, it will not work in applet unless i make the applet trusted because of security reasons. I have to use getAnonymousLogger() in applet if it is not trusted, and dont know if i can setup log level for this logger in one class and can use the same log level in other class also, for example in my class A i define Logger logger = Logger.getAnonymousLogger(); and set the logger leverl to ALL then in class B if i again define Logger log = Logger.getAnonymousLogger(); then what will be the log level, will it All or just info. have to test this in program Ashish