Releases: jcabi/jcabi-log
Logger.isEnabled()
New static method Logger.isEnabled()
added in this version
stdoutQuietly() bug fix
Bug fixed in stdoutQuietly()
, see #10
jcabi-parent 1.8
Parent 1.8, multiple minor issues fixed
Logger throws when too many params
As suggested in #8 Logger
in this version throws a runtime exception when total number of provided arguments is bigger than required in format pattern.
Besides that, this version resolves all FindBugs complaints.
log4j is an optional dependency
In this version log4j:log4j
is an optional dependency, see #6 for more details
VerboseProcess(ProcessBuilder, Level, Level) ctor
This version added new VerboseProcess(ProcessBuilder, Level, Level)
ctor
Configurable logging levels in VerboseProcess
In this version you can configure logging levels in VerboseProcess
, for example:
new VerboseProcess(
new ProcessBuilder("echo", "Hello, world!").start(),
Level.INFO, // stdout logging level
Level.SEVERE // stderr logging level
).stdout();
Stderr logged with WARN level
Bug #4 fixed in this version, now VerboseProcess
logs stderr with WARN logging level.
VerboseProcess#stdoutQuietly()
New method stdoutQuietly()
added to VerboseProcess
. This method, in contrary to stdout()
, doesn't throw a runtime exception when exit code of the process is not equal to zero.
Custom colors and levels in MulticolorLayout
An ability to specify custom colors and levels was added in MulticolorLayout
, for example:
log4j.rootLogger=INFO, CONSOLE
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.layout=com.jcabi.log.MulticolorLayout
log4j.appender.CONSOLE.layout.ConversionPattern=[%color{%-5p}] %c: %m%n
log4j.appender.CONSOLE.layout.Levels=INFO:2;10,WARN:2;32
log4j.appender.CONSOLE.layout.Colors=white:10
More details see here.