Class OceanusLogManager
java.lang.Object
io.github.tonywasher.joceanus.oceanus.logger.OceanusLogManager
Log Manager.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final classDefault Log Sink. -
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.static OceanusLoggerObtain a logger.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.
-
Method Details
-
getLogger
Obtain a logger.- Parameters:
pOwner- the owning class- Returns:
- the logger
-
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
-