Multiple files and other issues (part 2)

Hello all, I've tried to follow the guidelines and added the file Ceki suggested me. Anyway, it seems that the special package (here below "com.alcatel.wtd.neto") does not go into itst own file (here below "trace/NEtO.log) but remains in the main one (here below "trace/WebEML:log"). Any idea? This is it: <configuration debug="true"> <!-- *********************************************************************** --> <!-- ************************************************************* Appenders --> <!-- *********************************************************************** --> <!-- Appender for WebEML logging. Unspecified log goes here --> <appender name="WebEML" class="ch.qos.logback.core.FileAppender" > <file>trace/WebEML.log</file> <append>false</append> <!-- admit only ERROR messages in this appender --> <!-- <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> <level>error</level> </filter>--> <layout> <pattern>%d{yyyy-MM-dd HH:mm:ss},%p,%c,%F,%C{1} %m%n</pattern> </layout> </appender> <!-- Appender for NEtO component logging. All Com.Alcatel.WTD.NEtO goes here --> <appender name="NEtO" class="ch.qos.logback.core.FileAppender" > <file>trace/NEtO.log</file> <append>false</append> <layout> <pattern>%d{yyyy-MM-dd HH:mm:ss},%p,%c,%F,%C{1} %m%n</pattern> </layout> </appender> <!-- *********************************************************************** --> <!-- *************************************************************** Loggers --> <!-- *********************************************************************** --> <!-- Specific logger for NEtO package. --> <logger name="com.alcatel.wtd.neto" additivity="false"> <appender-ref ref="NEtO"/> </logger> <!-- Root logger --> <root level="DEBUG"> <appender-ref ref="WebEML"/> </root> </configuration> Thanks, Marco -------------------------------------------------------------------- mail2web.com What can On Demand Business Solutions do for you? http://link.mail2web.com/Business/SharePoint

The configuraition file looks good. Can you send a few lines of logging output in WebEML.log which should be in NEtO.log? m.bresciani@email.it wrote:
Hello all, I've tried to follow the guidelines and added the file Ceki suggested me. Anyway, it seems that the special package (here below "com.alcatel.wtd.neto") does not go into itst own file (here below "trace/NEtO.log) but remains in the main one (here below "trace/WebEML:log"). Any idea? This is it:
<configuration debug="true">
<appender name="WebEML" class="ch.qos.logback.core.FileAppender" > <file>trace/WebEML.log</file> <append>false</append> <layout> <pattern>%d{yyyy-MM-dd HH:mm:ss},%p,%c,%F,%C{1} %m%n</pattern> </layout> </appender>
<appender name="NEtO" class="ch.qos.logback.core.FileAppender" > <file>trace/NEtO.log</file> <append>false</append> <layout> <pattern>%d{yyyy-MM-dd HH:mm:ss},%p,%c,%F,%C{1} %m%n</pattern> </layout> </appender>
<logger name="com.alcatel.wtd.neto" additivity="false"> <appender-ref ref="NEtO"/> </logger> <root level="DEBUG"> <appender-ref ref="WebEML"/> </root> </configuration>
-- Ceki Gülcü Logback: The reliable, generic, fast and flexible logging framework for Java. http://logback.qos.ch

Ceki Gulcu ha scritto:
The configuraition file looks good. Can you send a few lines of logging output in WebEML.log which should be in NEtO.log?
Sure... tomorrow. ;-) Just to be sure, the classes have the only reference to SLF4J with something like that: private static final Logger LOG_ClassName = LoggerFactory.getLogger(ClassName.class); and the usual logging methods with: ClassName.LOG_ClassName.info("BLAH BLAH"); and so on just like the manual says. Mmmm I have another thing in mind... related to files and so on. The logback.xml is one as one is the "collection" of JArs that make my application but the application is run in two parts. The first one is NEtO (where I'd like to put its logs into NEtO.log) and the other component is JUSM (with WebEML.log) but JUSM is launched from NEtO using a JVM exec. Could this give problems to logback.xml? Packages have anyway the structure I gave so com.alcatel.wtd.neto contains all NEtO packages while other packages (i.e.: com.alcatel.wtd.* and some com.alcatel.*) have JUSM files... but logback should apply as well... or not? Marco

Marco Bresciani wrote:
Ceki Gulcu ha scritto:
The configuraition file looks good. Can you send a few lines of logging output in WebEML.log which should be in NEtO.log?
Sure... tomorrow. ;-)
Were you able to solve the issue? -- Ceki Gülcü Logback: The reliable, generic, fast and flexible logging framework for Java. http://logback.qos.ch

I made it! I've redone the file using the online wizard and now seems working fine.
From now on I'll have to think about the simplest usage of MDC, something like a startup timestamp added to each application session.
Thanks, Marco Ceki Gulcu ha scritto:
The configuraition file looks good. Can you send a few lines of logging output in WebEML.log which should be in NEtO.log?
m.bresciani@email.it wrote:
Hello all, I've tried to follow the guidelines and added the file Ceki suggested me. Anyway, it seems that the special package (here below "com.alcatel.wtd.neto") does not go into itst own file (here below "trace/NEtO.log) but remains in the main one (here below "trace/WebEML:log"). Any idea? This is it:
<configuration debug="true">
<appender name="WebEML" class="ch.qos.logback.core.FileAppender" > <file>trace/WebEML.log</file> <append>false</append> <layout> <pattern>%d{yyyy-MM-dd HH:mm:ss},%p,%c,%F,%C{1} %m%n</pattern> </layout> </appender>
<appender name="NEtO" class="ch.qos.logback.core.FileAppender" > <file>trace/NEtO.log</file> <append>false</append> <layout> <pattern>%d{yyyy-MM-dd HH:mm:ss},%p,%c,%F,%C{1} %m%n</pattern> </layout> </appender>
<logger name="com.alcatel.wtd.neto" additivity="false"> <appender-ref ref="NEtO"/> </logger> <root level="DEBUG"> <appender-ref ref="WebEML"/> </root> </configuration>
participants (3)
-
Ceki Gulcu
-
m.bresciani@email.it
-
Marco Bresciani