@HashCodeAndEqualsPlugin.Enhance public static class BuildLogger.StreamWriting extends Object implements BuildLogger
PrintStream
.BuildLogger.Adapter, BuildLogger.Compound, BuildLogger.NoOp, BuildLogger.StreamWriting
Constructor and Description |
---|
StreamWriting(PrintStream printStream)
Creates a new stream writing build logger.
|
Modifier and Type | Method and Description |
---|---|
void |
debug(String message)
Logs a message on the debug level.
|
void |
debug(String message,
Throwable throwable)
Logs a message on the debug level.
|
void |
error(String message)
Logs a message on the error level.
|
void |
error(String message,
Throwable throwable)
Logs a message on the error level.
|
void |
info(String message)
Logs a message on the info level.
|
void |
info(String message,
Throwable throwable)
Logs a message on the info level.
|
boolean |
isDebugEnabled()
Returns
true if the debug log level is enabled. |
boolean |
isErrorEnabled()
Returns
true if the error log level is enabled. |
boolean |
isInfoEnabled()
Returns
true if the info log level is enabled. |
boolean |
isWarnEnabled()
Returns
true if the warn log level is enabled. |
static BuildLogger |
toSystemError()
Creates a build logger that writes to
System.err . |
static BuildLogger |
toSystemOut()
Creates a build logger that writes to
System.out . |
void |
warn(String message)
Logs a message on the warn level.
|
void |
warn(String message,
Throwable throwable)
Logs a message on the warn level.
|
public StreamWriting(PrintStream printStream)
printStream
- The target for writing statements.public static BuildLogger toSystemOut()
System.out
.System.out
.public static BuildLogger toSystemError()
System.err
.System.err
.public boolean isDebugEnabled()
true
if the debug log level is enabled.isDebugEnabled
in interface BuildLogger
true
if the debug log level is enabled.public void debug(String message)
debug
in interface BuildLogger
message
- The message to log.public void debug(String message, Throwable throwable)
debug
in interface BuildLogger
message
- The message to log.throwable
- A throwable that is attached to the message.public boolean isInfoEnabled()
true
if the info log level is enabled.isInfoEnabled
in interface BuildLogger
true
if the info log level is enabled.public void info(String message)
info
in interface BuildLogger
message
- The message to log.public void info(String message, Throwable throwable)
info
in interface BuildLogger
message
- The message to log.throwable
- A throwable that is attached to the message.public boolean isWarnEnabled()
true
if the warn log level is enabled.isWarnEnabled
in interface BuildLogger
true
if the warn log level is enabled.public void warn(String message)
warn
in interface BuildLogger
message
- The message to log.public void warn(String message, Throwable throwable)
warn
in interface BuildLogger
message
- The message to log.throwable
- A throwable that is attached to the message.public boolean isErrorEnabled()
true
if the error log level is enabled.isErrorEnabled
in interface BuildLogger
true
if the error log level is enabled.public void error(String message)
error
in interface BuildLogger
message
- The message to log.public void error(String message, Throwable throwable)
error
in interface BuildLogger
message
- The message to log.throwable
- A throwable that is attached to the message.Copyright © 2014–2025. All rights reserved.