The java.util.logging facility is built into Java; since 1.4. You don't need any external jars to use it.
Log4J is a 3rd-party implementation of a logging package. Most developers find Log4J easier to configure and more feature-rich than the built-in logging.
Apache Commons Logging is a 3rd-party implementation that lets your code use either of the above. If Log4J is detected, it will be used. Otherwise, it reverts to java.util.logging. The advantage is that if the code is distributed, the end user can choose which logging package to use by simply including Log4J in the classpath or not.
s begri wrote:Thank you all,
Shanky Sohar could you please describe what t is declared static final so that it will be a compile time constant.. mean and how it is effect on the application ?
Static : it is available without instantiating the class.
Final : for Preventing the inheritance further ie; the class with final word as prefix cannot be extend further!.
means logger is been decided as the reference of the Hello.class itself at the compile time and its final,you cann't change it to something else.
For a complete application,logger remain as the reference to a hello.class,you cann't change.
if you are not marking it as static then it will be initialed at runtime or if you are not marking it as final then within a class itself you can change the reference of it to
logger = Logger.getLogger(Hello.class);
And you are marking it as private,as you don't want any other class can use this logger just because it is static and cab be access using classname..