Thinking about logging.
What approach is better for logging?
a) Use the java.logging class direcly into code (with if statements);
b) Using proxy classes;
c) Using aspect oriented programming;
d) Using a third part logging lib;
e) Any other idea?
I like most the two initial options. The direct use of logging class is simple, easy to maintain and is very usefull in small applications. And it's possible to avoid if statements by configuring log level in a xml file or other external file.
Proxies are also cool in my opinion. They let your code easy to read and with almost no overhead.
What do you guys think? I whould like very much to hear.
a) Use the java.logging class direcly into code (with if statements);
b) Using proxy classes;
c) Using aspect oriented programming;
d) Using a third part logging lib;
e) Any other idea?
I like most the two initial options. The direct use of logging class is simple, easy to maintain and is very usefull in small applications. And it's possible to avoid if statements by configuring log level in a xml file or other external file.
Proxies are also cool in my opinion. They let your code easy to read and with almost no overhead.
What do you guys think? I whould like very much to hear.
