-
1. Re: Simple, customized logging in JBoss
darranl Jun 10, 2004 6:47 AM (in response to shanghai_star)Read the Log4J documentation and configure the log4j.xml file accordingly.
-
2. Re: Simple, customized logging in JBoss
cwestfall Jul 1, 2004 4:05 PM (in response to shanghai_star)I have the exact same question? How about a little better solution than the last reply? Anyone? Please?
-
3. Re: Simple, customized logging in JBoss
darranl Jul 1, 2004 6:42 PM (in response to shanghai_star)What is wrong with the Log4J documentation, what do you not understand about it?
-
4. Re: Simple, customized logging in JBoss
cwestfall Jul 2, 2004 7:24 AM (in response to shanghai_star)First off, no where in the log4j documentation can I find anything about configuration for JBoss (obviously right?). Second, I have followed the example for "Using your own log4j.xml file" found here. I even used the authors war and I can't get jboss to log to the log file he has configured in his log4j.xml. Any help other than RTFM would be great. Thanks!
-
5. Re: Simple, customized logging in JBoss
cwestfall Jul 2, 2004 7:26 AM (in response to shanghai_star)in my last post, "found here" resolves to http://www.jboss.org/wiki/Wiki.jsp?page=Logging, sorry my link didn't work.
-
6. Re: Simple, customized logging in JBoss
darranl Jul 2, 2004 7:54 AM (in response to shanghai_star)Now we are getting somewhere, the first two questions in this thread could have been translated to 'I am lazy and can't be bothered to find anything out for myself' (There was no other information to sugest anything else).
The configuration is still really Log4J specific and not JBoss specific, JBoss is using Log4J and you will be using Log4J. Log4J has not become part of JBoss and it does not require JBoss.
The original request was for the output from your own classes to go to your own log file.
You should be able to define a new appender in the conf\log4j.xml file which will be the definition of your log file. You can then define a category to send the output from your classes to your log file. -
7. Re: Simple, customized logging in JBoss
cwestfall Jul 2, 2004 8:24 AM (in response to shanghai_star)Is there anyway way to get JBoss to recognize the log4j.xml inside my war? That way as soon as I deploy, I have loging configured. I don't want to change the conf/log4j.xml on the app server, I want to include the log4j.xml with my web application.
-
8. Re: Simple, customized logging in JBoss
mikefinn Jul 5, 2004 12:36 AM (in response to shanghai_star)You should search the forums or wiki for the answer. Many have asked about app-scoped log4j config, but I don't remember ever seeing an answer.
BTW - RTFM doesn't help much when it comes to log4j.xml. Docs on this thing seem to be pretty much non-existent. In fact, even the apache/logging doc just says something like 'you can write the config file in properties or XML format'. Not much help there. About all you can do as a newbie is look at a working xml config (the one in JBoss is a good example) and a properties config and see how the various constructs are represented in xml, or back into it from the log4j.dtd.
About the only useful doc I have seen is here:
http://supportweb.cs.bham.ac.uk/documentation/tutorials/docsystem/build/tutorials/log4j/log4j.html -
9. Re: Simple, customized logging in JBoss
kabirkhan Jul 5, 2004 4:28 AM (in response to shanghai_star)As part of the "all docs" subscription, there is a huuuge document dedicated to logging. I've never read it though, so I don't know if it answers your question.