public class FormatterLogger extends Object
Constructor and Description |
---|
FormatterLogger() |
Modifier and Type | Method and Description |
---|---|
String |
formatterSlf4j(String format)
Formatter a string from
org.slf4j.Logger format to String.format
Example:
"The user {} cannot make login with password [{}]"
"The user %1$s cannot make login with password [%2$s]" |
Object[] |
toString(Object... args)
to String the objects
args calling toString method, when
the object is instance of java.lang.Exception the getMessage()
is called. |
public FormatterLogger()
public String formatterSlf4j(String format)
org.slf4j.Logger
format to String.format
Example:
"The user {} cannot make login with password [{}]"
"The user %1$s cannot make login with password [%2$s]"format
- SLF4J formatter messagepublic Object[] toString(Object... args)
args
calling toString method, when
the object is instance of java.lang.Exception
the getMessage()
is called.args
- objects to get message as stringnull
values are converted to "null" string.Copyright © 2012–2020 jkniv, copyleft code. All rights reserved.