Class LogParams
-
Constructor Summary
ConstructorsConstructorDescriptionLogParams constructor which allows to create LogParams instance. -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete()Gets the path to the file to write the log to.Gets log format string. The string which allows to write the log in a custom format.Gets LogOutputFlags.voidsetLogFileName(String logFileName) Sets file name to write the log to.voidsetLogFormat(String logFormat) Sets log format string. The string which allows to write the log in a custom format.voidsetLogOutputFlags(EnumSet<LogOutputFlags> logOutputFlags) Sets LogOutputFlags. Allows to specify where to put DLE's log.
-
Constructor Details
-
LogParams
public LogParams()LogParams constructor which allows to create LogParams instance. The LogParams object contains all settings required for logging. The log output, log file name and log string format can be configured with it.
-
-
Method Details
-
delete
public void delete() -
getLogOutputFlags
Gets LogOutputFlags. Supported types of logging are: console, file and Event Log (for Windows only). The outputs can be mixed by ORing corresponding flags. It is also possible to suppress any logging using LogOutputFlags::None.- Returns:
- currently used flags.
-
setLogOutputFlags
Sets LogOutputFlags. Allows to specify where to put DLE's log. Supported types of logging are: console, file and Event Log (for Windows only). The outputs can be mixed by ORing corresponding flags. It is also possible to suppress any logging using LogOutputFlags::None.- Parameters:
logOutputFlags- the flags containing outputs to write the log to.
-
getLogFileName
Gets the path to the file to write the log to.- Returns:
- Path to the file to write the log to.
-
setLogFileName
Sets file name to write the log to. NOTE: Ignored if LogOuputFlag::File flag is not set.- Parameters:
logFileName- Path to the file to write the log to.
-
getLogFormat
Gets log format string. The string which allows to write the log in a custom format. NOTE: PDFL supports the following markers to form output string:"%d" - current date (mmddyyyy). Example: 07292013 "%t" - current time (hhmmss). Example: 121311 "%s" - error source. Example: "DLFramework" "%e" - error type. It can be debug, info, warning, error, fatal. The value which will be output within this marker depends on severity value. It always outputs "error" string.
"%m" - error message. Example: "Exception: InExistent.pdf: This file cannot be found. Error number: 1074397201" "%T" - full date. It contains current date, current time and the timezone (yyyy-mm-ddThh:mm:ss+/-hh:mm). Example: 2013-07-29T12:13:11+03:00
By default "%T | %s | %e | %m" string format is used.
- Returns:
- string Log record format.
-
setLogFormat
Sets log format string. The string which allows to write the log in a custom format. NOTE: PDFL supports the following markers to form output string:"%d" - current date (mmddyyyy). Example: 07292013 "%t" - current time (hhmmss). Example: 121311 "%s" - error source. Example: "DLFramework" "%e" - error type. It can be debug, info, warning, error, fatal. The value which will be output within this marker depends on severity value. Currently it always outputs "error" string.
"%m" - error message. Example: "Exception: InExistent.pdf: This file cannot be found. Error number: 1074397201" "%T" - full date. It contains current date, current time and the timezone (yyyy-mm-ddThh:mm:ss+/-hh:mm). Example: 2013-07-29T12:13:11+03:00
By default "%T | %s | %e | %m" string format is used.
- Parameters:
logFormat- string Log record format.
-