how to deactivate logger (OFF) in the threads. The messages are still displayed in the console

Hi all, I am using a small logback.xml conf file to display the logger messages into the console ---------------------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8"?> <configuration> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> <level>OFF</level> </filter> <encoder> <pattern>%d{HH:mm:ss.SSS} %-5level %logger{25} - %msg%n</pattern> </encoder> </appender> <root level="INFO"> <appender-ref ref="STDOUT"/> </root> <logger level="ERROR" name="general"/> <logger level="OFF" name="net"/> <logger level="OFF" name="wire"/> <logger level="OFF" name="VM"/> <logger level="OFF" name="dump"/> <logger level="OFF" name="gas"/> <logger level="INFO" name="sync"/> <logger level="INFO" name="blockqueue"/> </configuration> ---------------------------------------------------------------------------- The problem is, I still see the *VM* and *gas* messages from the logger although I have deactivated it (OFF): 2016-02-22 21:36:13.389 INFO 7574 --- [ Thread-10] *gas* : [369500479] Spent for cause: [DUP1], gas: [3] 2016-02-22 21:36:13.389 INFO 7574 --- [ Thread-10] *VM* : [278] Op: [DUP1 ] Gas: [478018] Deep: [0] Hint: [] 2016-02-22 21:36:13.389 INFO 7574 --- [ Thread-10] *gas* : [369500479] Spent for cause: [PUSH4], gas: [3] 2016-02-22 21:36:13.390 INFO 7574 --- [ Thread-10] *VM* : [283] Op: [PUSH4 ] Gas: [478015] Deep: [0] Hint: [abc00bb4] 2016-02-22 21:36:13.390 INFO 7574 --- [ Thread-10] *gas* : [369500479] Spent for cause: [EQ], gas: [3] The classes which uses the logger, they define it as follows: private static final Logger logger = LoggerFactory.getLogger("VM"); private static final Logger dumpLogger = LoggerFactory.getLogger("dump"); What am I missing? I want to avoid the *VM* and *gas* messages Regards and thanks in advance! S.

The format of the output provided in your email does not match the configuration file. I suspect that a different configuration is being used. Start your application using the OnConsoleStatusListener to see which configuration file is being picked up. See [1] for details. [1] http://logback.qos.ch/manual/configuration.html#logback.statusLC On 2/22/2016 21:55, Sky Dog wrote:
Hi all,
I am using a small logback.xml conf file to display the logger messages into the console
----------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?> <configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<filter class="ch.qos.logback.classic.filter.ThresholdFilter"> <level>OFF</level> </filter>
<encoder> <pattern>%d{HH:mm:ss.SSS} %-5level %logger{25} - %msg%n</pattern> </encoder>
</appender>
<root level="INFO"> <appender-ref ref="STDOUT"/> </root>
<logger level="ERROR" name="general"/> <logger level="OFF" name="net"/> <logger level="OFF" name="wire"/> <logger level="OFF" name="VM"/> <logger level="OFF" name="dump"/> <logger level="OFF" name="gas"/>
<logger level="INFO" name="sync"/> <logger level="INFO" name="blockqueue"/>
</configuration>
----------------------------------------------------------------------------
The problem is, I still see the *VM* and *gas* messages from the logger although I have deactivated it (OFF):
2016-02-22 21:36:13.389 INFO 7574 --- [ Thread-10] *gas* : [369500479] Spent for cause: [DUP1], gas: [3] 2016-02-22 21:36:13.389 INFO 7574 --- [ Thread-10] *VM* : [278] Op: [DUP1 ] Gas: [478018] Deep: [0] Hint: [] 2016-02-22 21:36:13.389 INFO 7574 --- [ Thread-10] *gas* : [369500479] Spent for cause: [PUSH4], gas: [3] 2016-02-22 21:36:13.390 INFO 7574 --- [ Thread-10] *VM* : [283] Op: [PUSH4 ] Gas: [478015] Deep: [0] Hint: [abc00bb4] 2016-02-22 21:36:13.390 INFO 7574 --- [ Thread-10] *gas* : [369500479] Spent for cause: [EQ], gas: [3]
The classes which uses the logger, they define it as follows:
private static final Logger logger = LoggerFactory.getLogger("VM"); private static final Logger dumpLogger = LoggerFactory.getLogger("dump");
What am I missing? I want to avoid the *VM* and *gas* messages
Regards and thanks in advance! S.
_______________________________________________ logback-user mailing list logback-user@qos.ch http://mailman.qos.ch/mailman/listinfo/logback-user
participants (2)
-
Ceki Gulcu
-
Sky Dog