Trouble with varargs output

Hi all, I am trying to use logback 1.1.3 with slf4j 1.7.12. This is my log statement: logger.debug("%s %d, %d", "a", 1, 2); The logger is a static constant: private static final Logger logger = LoggerFactory.getLogger(TTSGrammarTest.class); The output of the log statement is: 02:35:16.415 [main] DEBUG test.TTSGrammarTest - %s %d, %d Apparently, the format string and the supplied parameters are not evaluated correctly. I don't have any logging configuration - the program is run under eclipse. Thanks in advance for any help, Arne

Isn't it supposed to be logger.debug("{} {} {}", "a", 1, 2); On Jun 3, 2015 5:45 PM, "Arne.Adams@t-online.de" <Arne.Adams@t-online.de> wrote:
Hi all,
I am trying to use logback 1.1.3 with slf4j 1.7.12.
This is my log statement:
logger.debug("%s %d, %d", "a", 1, 2);
The logger is a static constant:
private static final Logger logger = LoggerFactory.getLogger(TTSGrammarTest.class);
The output of the log statement is:
02:35:16.415 [main] DEBUG test.TTSGrammarTest - %s %d, %d
Apparently, the format string and the supplied parameters are not evaluated correctly.
I don't have any logging configuration - the program is run under eclipse.
Thanks in advance for any help,
Arne
_______________________________________________ Logback-user mailing list Logback-user@qos.ch http://mailman.qos.ch/mailman/listinfo/logback-user

Thanks - that did it. I thought the format string was a standard java format string. Kind regards, Arne -----Original-Nachricht----- Betreff: Re: [logback-user] Trouble with varargs output Datum: Thu, 04 Jun 2015 02:48:29 +0200 Von: Robert Kuhar <robertkuhar@gmail.com> An: logback users list <logback-user@qos.ch> Isn't it supposed to be logger.debug("{} {} {}", "a", 1, 2); On Jun 3, 2015 5:45 PM, "Arne.Adams@t-online.de [1]" <Arne.Adams@t-online.de [2]> wrote: Hi all, I am trying to use logback 1.1.3 with slf4j 1.7.12. This is my log statement: logger.debug("%s %d, %d", "a", 1, 2); The logger is a static constant: private static final Logger logger = LoggerFactory.getLogger(TTSGrammarTest.class); The output of the log statement is: 02:35:16.415 [main] DEBUG test.TTSGrammarTest - %s %d, %d Apparently, the format string and the supplied parameters are not evaluated correctly. I don't have any logging configuration - the program is run under eclipse. Thanks in advance for any help, Arne _______________________________________________ Logback-user mailing list Logback-user@qos.ch [3] http://mailman.qos.ch/mailman/listinfo/logback-user [4] Links: ------ [1] mailto:Arne.Adams@t-online.de [2] mailto:Arne.Adams@t-online.de [3] mailto:Logback-user@qos.ch [4] http://mailman.qos.ch/mailman/listinfo/logback-user
participants (2)
-
Arne.Adams@t-online.de
-
Robert Kuhar