All very welcome. Yes, I'm using a servlet to initialise Log4J, but I'm going to expand on it a bit more.
On 18/07/2008, Bob <[EMAIL PROTECTED]> wrote: > > No probs, > > yup, the XML file is easy enough to use. And if you use Eclipse to develop > you can also extract the log4j.dtd file from the log4j jar and plonk it in > the same directory as your log4j.xml file, that should automatically give > you code completion for the xml file while you edit it. > > When you load in your properties I suggest using the configureAndWatch > method: > DOMConfigurator.configureAndWatch(logFilePath); > > If you aren't doing it already. Cause somewhere along the line you will get > tired of shutting down your application to reload properties :-) > > Alternatively, if you are running a web application where you have a > servlet initializing your log4j, you can introduce a method to reload the > log4j properties on request. > > Ok ok ok, lots more than you asked for ;-) > > great day, > W > > > On Fri, Jul 18, 2008 at 2:22 PM, Jason Purcell <[EMAIL PROTECTED]> > wrote: > >> Thanks, man! >> >> I'm still using the old-school properties file, but I might as well switch >> to the XML one. >> >> >> On 18/07/2008, Bob <[EMAIL PROTECTED]> wrote: >>> >>> Hi Jason, >>> >>> I only saw your question now. Yes it is indeed possible. I am attaching >>> an example log4j configuration file which I am using to educate some of the >>> guys on my team about log4j. I have not uploaded the source of the >>> presentation that goes along with the config file to sourceforge yet as I am >>> still busy setting up the whole presentation. But this file should help some >>> at least. If you are interested I will notify you once the complete >>> presentation is up and available. (Should be by this coming Wednesday. >>> >>> great day, >>> Werner >>> >>> On Thu, Jul 17, 2008 at 2:10 PM, Jason Purcell <[EMAIL PROTECTED]> >>> wrote: >>> >>>> Hi... >>>> >>>> I have console and file logging configured in a properties file. >>>> >>>> I want to set the priority for the file as DEBUG and the one for the >>>> console as INFO. How do I do this? >>>> >>>> The priority for my logger is set to DEBUG. >>>> >>>> Is it even possible in Log4J? >>>> >>>> Regards, >>>> Jason. >>>> >>>> >>>> >>> >>> > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CTJUG Tech" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.co.za/group/CTJUG-Tech?hl=en -~----------~----~----~----~------~----~------~--~---
