std.logger.filelogger

Types 2

An option to create FileLogger directory if it is non-existent.

This Logger implementation writes log messages to the associated file. The name of the file has to be passed on construction time. If the file is already present new log messages will be append at its end.

Fields
File file_The `File` log messages are written to.
string filenameThe filename of the `File` log messages are written to.
Methods
File file() @property @safeIf the `FileLogger` is managing the `File` it logs to, this method will return a reference to this File.
void beginLogMsg(string file, int line, string funcName, string prettyFuncName, string moduleName, LogLevel logLevel, Tid threadId, SysTime timestamp, Logger logger) @safe
void logMsgPart(scope const(char)[] msg)
void writeLogMsg(ref LogEntry payload)
string getFilename()If the `FileLogger` was constructed with a filename, this method returns this filename. Otherwise an empty `string` is returned.
Constructors
this(const string fn, const LogLevel lv = LogLevel.all)A constructor for the `FileLogger` Logger.
this(const string fn, const LogLevel lv, CreateFolder createFileNameFolder)A constructor for the `FileLogger` Logger that takes a reference to a `File`.
this(File file, const LogLevel lv = LogLevel.all)A constructor for the `FileLogger` Logger that takes a reference to a `File`.