Package org.apache.logging.log4j.util
Class LowLevelLogUtil
- java.lang.Object
-
- org.apache.logging.log4j.util.LowLevelLogUtil
-
final class LowLevelLogUtil extends java.lang.Object
PrintWriter-based logging utility for classes too low level to useStatusLogger
. Such classes cannot use StatusLogger as StatusLogger orSimpleLogger
depends on them for initialization. Other framework classes should stick to using StatusLogger.- Since:
- 2.6
-
-
Field Summary
Fields Modifier and Type Field Description private static java.io.PrintWriter
writer
-
Constructor Summary
Constructors Modifier Constructor Description private
LowLevelLogUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
log(java.lang.String message)
Logs the given message.static void
logException(java.lang.String message, java.lang.Throwable exception)
static void
logException(java.lang.Throwable exception)
static void
setOutputStream(java.io.OutputStream out)
Sets the underlying OutputStream where exceptions are printed to.static void
setWriter(java.io.Writer writer)
Sets the underlying Writer where exceptions are printed to.
-
-
-
Method Detail
-
log
public static void log(java.lang.String message)
Logs the given message.- Parameters:
message
- the message to log- Since:
- 2.9.2
-
logException
public static void logException(java.lang.Throwable exception)
-
logException
public static void logException(java.lang.String message, java.lang.Throwable exception)
-
setOutputStream
public static void setOutputStream(java.io.OutputStream out)
Sets the underlying OutputStream where exceptions are printed to.- Parameters:
out
- the OutputStream to log to
-
setWriter
public static void setWriter(java.io.Writer writer)
Sets the underlying Writer where exceptions are printed to.- Parameters:
writer
- the Writer to log to
-
-