I am using JBOSS 4.2.2 server to deploy multiple web applications. Each application uses Hibernate, and for each application there are saperate log and saparate appendar files. Now for Hibernate protocols for one application, it should be indicated in the log file of this particular application. Does anyone know how to configure the log4j.xml file to achieve this?
Thank you and welcome, Milind
JBoss TCL, . , .
( , " .war " ):
<appender name="App1Log" class="org.apache.log4j.FileAppender"> <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler" /> <param name="Append" value="false"/> <param name="File" value="${jboss.server.log.dir}/app1.log"/> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%d{ISO8601} %-5p [%8.8t][%20.20c] %m%n"/> </layout> <filter class="org.jboss.logging.filter.TCLFilter"> <param name="AcceptOnMatch" value="true"/> <param name="DeployURL" value="app1-exp.war"/> </filter> </appender>
, , log4j.xml path hibernate i.e org.hibernate, .
, , hibernate log4j, . hibernate log4j.xml, system.out
100%, . , , .
Log4J . ( ) . log-, , MDC.
appender, MDC .
, log , .
Source: https://habr.com/ru/post/1703197/More articles:IE onPaste event using javascript not HTML - javascriptHow to set leading zeros in AssemblyVersion, for example, "2.03.406.2" in .net - c #No connection can be made because the target machine is actively rejecting it - c #Monitoring bandwidth on your server - linuxHow to make a PDF file using PHP - phpHow can I control the color of the text used in the zoom window? - cocoa-touchHow to combine lines in a large, unsorted file without running out of memory in Perl? - fileWhat are software projects for humanitarian, eco / green and sustainable development? - greensoftwareSharePoint Site Layouts - sharepointReading data with various formats in C ++ - c ++All Articles