Package ai.platon.pulsar.common
Class MessageWriter
-
- All Implemented Interfaces:
-
java.lang.AutoCloseable
public final class MessageWriter implements AutoCloseable
A simple log system
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classMessageWriter.Companion
-
Field Summary
Fields Modifier and Type Field Description public final static IntegerOFFpublic final static IntegerERRORpublic final static IntegerWARNpublic final static IntegerINFOpublic final static IntegerDEBUGprivate IntegermaxFileSizeprivate SimpleDateFormatdateFormatprivate IntegercheckSizeprivate BooleanwritingErrorprivate final PathfilePathprivate IntegerlevelFilepublic final static MessageWriter.CompanionCompanion
-
Constructor Summary
Constructors Constructor Description MessageWriter(Path filePath, Integer levelFile)
-
Method Summary
Modifier and Type Method Description final IntegergetMaxFileSize()final UnitsetMaxFileSize(Integer maxFileSize)final SimpleDateFormatgetDateFormat()final UnitsetDateFormat(SimpleDateFormat dateFormat)final IntegergetCheckSize()final UnitsetCheckSize(Integer checkSize)final BooleangetWritingError()final UnitsetWritingError(Boolean writingError)final PathgetFilePath()final IntegergetLevelFile()final UnitsetLevelFile(Integer levelFile)final Unitwrite(String s)final Unitwrite(Integer level, KClass<?> clazz, String s, Throwable t)final Unitwrite(Integer level, String module, String s, Throwable t)Unitclose()-
-
Method Detail
-
getMaxFileSize
final Integer getMaxFileSize()
-
setMaxFileSize
final Unit setMaxFileSize(Integer maxFileSize)
-
getDateFormat
final SimpleDateFormat getDateFormat()
-
setDateFormat
final Unit setDateFormat(SimpleDateFormat dateFormat)
-
getCheckSize
final Integer getCheckSize()
-
setCheckSize
final Unit setCheckSize(Integer checkSize)
-
getWritingError
final Boolean getWritingError()
-
setWritingError
final Unit setWritingError(Boolean writingError)
-
getFilePath
final Path getFilePath()
-
getLevelFile
final Integer getLevelFile()
-
setLevelFile
final Unit setLevelFile(Integer levelFile)
-
-
-
-