Package com.github.nedelis.jc4j.logging
Class JC4JLoggerBuilder
java.lang.Object
com.github.nedelis.jc4j.logging.JC4JLoggerBuilder
This class helps to create JC4JLogger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull JC4JLoggerbuild()Builds a new loggersetLogLevel(@org.jetbrains.annotations.Range(from=0L, to=7L) int level) Specifies the level of the logger (min level of the messages).setPathToLogFile(@NotNull Path path) Specifies the path to the log file that will be storedsetPattern(@NotNull JC4JLoggerMessagePattern pattern) Specifies the message pattern of the logger.
-
Constructor Details
-
JC4JLoggerBuilder
public JC4JLoggerBuilder() -
JC4JLoggerBuilder
-
-
Method Details
-
setPathToLogFile
Specifies the path to the log file that will be stored- Parameters:
path- path to the log file- Returns:
- current builder with reassigned path
-
setLogLevel
Specifies the level of the logger (min level of the messages). You must put value between 0 and 7.- Parameters:
level- the level of the logger- Returns:
- current builder with reassigned logger level
- See Also:
-
setPattern
Specifies the message pattern of the logger.- Parameters:
pattern- custom message pattern- Returns:
- current builder with the reassigned message pattern
- See Also:
-
build
Builds a new logger- Returns:
- new logger with specified properties
-