Having the following code: log.info("parameters {} and {}", param1, param2) compiles and works well with SLF4J in Scala
However if I want to pass more arguments, I need to use Array:
log.info("parameters {} and {} and {}", Array(param1, param2,param3))
which simply substitutes first parameter with array.toString and leaves rest of parameters unbound.
The following code
log.info("parameters {} and {} and {}", Array(param1, param2,param3) : _*)
doesn't compile, because of:
error: overloaded method value info with alternatives:
(org.slf4j.Marker,java.lang.String)Unit <and>
(java.lang.String,java.lang.Throwable)Unit <and>
(java.lang.String,Array[java.lang.Object])Unit <and>
(java.lang.String,Any)Unit
cannot be applied to (java.lang.String, Any)
log.info("parameters {} and {} and {}", Array(param1, param2,param3) : _*)
What am I missing here?