C
cteb
Hi all!
I'm trying to use java.util.logger (because it's already part of the
runtime library). I've read part of the API docs and the logging guide,
but I'm still in the dark on how to accomplish the following:
* In each of my application's classes I want to keep the logger setup to
a single line like this in class Foo:
private static final Logger log = Logger.getLogger(Foo.class.getName());
However, I can set up the logging subsystem elsewhere with all the
verbosity it needs.
* I want logging output to look like this:
YYYY-MM-DD HH:mm:SS --class--------- level message
2008-09-30 14:59:34 my.namespace.Foo INFO: something happened
* Those lines should be printed to stdout and into files, one file per
day, named YYYYMMDD.log in some directory I want to specify.
Can anyone show me how to set this up? I think I can go on reading docs
for hours and still not find a good example with this common
configuration. This can't be that hard?!
Thanks!
-- c.
I'm trying to use java.util.logger (because it's already part of the
runtime library). I've read part of the API docs and the logging guide,
but I'm still in the dark on how to accomplish the following:
* In each of my application's classes I want to keep the logger setup to
a single line like this in class Foo:
private static final Logger log = Logger.getLogger(Foo.class.getName());
However, I can set up the logging subsystem elsewhere with all the
verbosity it needs.
* I want logging output to look like this:
YYYY-MM-DD HH:mm:SS --class--------- level message
2008-09-30 14:59:34 my.namespace.Foo INFO: something happened
* Those lines should be printed to stdout and into files, one file per
day, named YYYYMMDD.log in some directory I want to specify.
Can anyone show me how to set this up? I think I can go on reading docs
for hours and still not find a good example with this common
configuration. This can't be that hard?!
Thanks!
-- c.