Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Multiple log files with Java logging  RSS feed

 
Mike Hogeboom
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I understand how to programatically have mutiple log files using Java logging (by assigning handlers to the logger in the code), but how can you do this in the properties file.

For instance if I have two loggers:

com.wombat1
com.wombat2

I would like to do something like

com.wombat1.pattern=myFile1.log
com.wombat2.pattern=myFile2.log

But this doesn't seem to work, unliss you assign a handler in the code and change the pattern on the handler.

You can certainly change the level on the logger, like:

com.wombat1.level=SEVERE
com.wombat2.level=ALL

But how do I do this on the file name?

Any help is greatly appreciated.

Thanks,
Mike
 
Mike Hogeboom
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm sure someone has a solution. Please share your knowledge.

-Mike
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!