Class OceanusLogEngine
java.lang.Object
io.github.tonywasher.joceanus.oceanus.logger.OceanusLogEngine
The log engine.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final classDefault Log Sink. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringformatData(byte[] pData) Format data.static StringformatData(byte[] pData, int pOffset, int pLength) Format data.(package private) StringformatMessage(Class<?> pOwner, OceanusLogLevel pLevel, String pMessage) Format message.(package private) static voidsetSink(OceanusLogSink pSink) Set Sink.(package private) voidwriteLogMessage(String pMessage) Write log message.(package private) voidwriteLogMessage(String pMessage, Throwable pException) Write log message and exception.
-
Constructor Details
-
OceanusLogEngine
OceanusLogEngine()The constructor.
-
-
Method Details
-
setSink
Set Sink.- Parameters:
pSink- the sink
-
formatMessage
Format message.- Parameters:
pOwner- the ownerpLevel- the log levelpMessage- the message to format- Returns:
- the formatted string
-
formatData
Format data.- Parameters:
pData- the data to format- Returns:
- the formatted data
-
formatData
Format data.- Parameters:
pData- the data to formatpOffset- the offsetpLength- the length of data- Returns:
- the formatted data
-
writeLogMessage
Write log message.- Parameters:
pMessage- the message to format
-
writeLogMessage
Write log message and exception.- Parameters:
pMessage- the message to formatpException- the exception
-