Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / JavaBeans / May 2004

Tip: Looking for answers? Try searching our database.

log4j writing to multiple logs conditionally

Thread view: 
Arvind - 23 May 2004 22:40 GMT
Hi,

Is there a way log4j could be configured to write to different files
conditionally? Let me try to explain what I need more clearly.

The application iam working on , consists of multiple Message Driven
Beans (the same can be substituted by multiple SessionBeans), each
driving  a separate application. Each of these receive requests which
are ofcourse different from each other. Currently all the logs go into
a single file. I would like to know if we could configure log4j to
write it to separate files based on which Bean receives the
message/request.

Please let me know if I have been vague, and wld like me to explain it
in more detail.

Thanks
Arvind.
Robert Klemme - 24 May 2004 10:44 GMT
> Hi,
>
[quoted text clipped - 11 lines]
> Please let me know if I have been vague, and wld like me to explain it
> in more detail.

Dunno about log4j but with java.util.logging you can have a mulitude of
loggers that all have their own output channel.  I assume similar things
can be done with log4j.

So the way would be to have each bean use its own logger that writes to a
different output.

   robert


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.