• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Multiple log files with Java logging

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm sure someone has a solution. Please share your knowledge.

-Mike
 
reply
    Bookmark Topic Watch Topic
  • New Topic