private static final Logger LOGGER = LoggerFactory.getLogger(Updater.class);
I am using SLF4J and Logback
When I try to log statements
LOGGER.info("{}:{}:{}", one, two, three)
it says
cannot find symbol method info(java.lang.String,java.lang.String,java.lang.String,java.lang.String)
Is there not any way I can log more than two variables in a single info statement?
You must upgrade SLF4J to 1.7 which includes
Logger.info(java.lang.String, java.lang.Object...)varargs method. See Bug 31 – Varargs for Logger methods fixed after six years worth of discussion.Prior to 1.7 you must surround arguments with
Object[]if you are using more than two:See also