View source code
							
							
						
								Display the source code in std/experimental/logger/filelogger.d from which this
								page was generated on github.
							
						
							Report a bug
							
						
								If you spot a problem with this page, click here to create a
								Bugzilla issue.
							
						
							
								Improve this page
							
							
					
								Quickly fork, edit online, and submit a pull request for this page.
								Requires a signed-in GitHub account. This works well for small changes.
								If you'd like to make larger changes you may want to consider using
								local clone.
							
						Class std.experimental.logger.filelogger.FileLogger
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.
						
					
				Constructors
| Name | Description | 
|---|---|
| this(fn, lv) | A constructor for the FileLoggerLogger. | 
| this(fn, lv, createFileNameFolder) | A constructor for the FileLoggerLogger that takes a reference to
    aFile. | 
| this(file, lv) | A constructor for the FileLoggerLogger that takes a reference to
    aFile. | 
Fields
| Name | Type | Description | 
|---|---|---|
| file_ | File | The Filelog messages are written to. | 
| filename | string | The filename of the Filelog messages are written to. | 
Properties
| Name | Type | Description | 
|---|---|---|
| file[get] | File | If the FileLoggeris managing theFileit logs to, this
    method will return a reference to this File. | 
| fatalHandler[get, set] | void delegate() | This delegateis called in case a log message withLogLevelgets logged. | 
| logLevel[get, set] | LogLevel | The LogLeveldetermines if the log call are processed or dropped
    by theLogger. In order for the log call to be processed theLogLevelof the log call must be greater or equal to theLogLevelof thelogger. | 
Methods
| Name | Description | 
|---|---|
| getFilename() | If the FileLoggerwas constructed with a filename, this method
    returns this filename. Otherwise an emptystringis returned. | 
| factory(classname) | Create instance of class specified by the fully qualified name classname. The class must either have no constructors or have a default constructor. | 
| forwardMsg(payload) | This method allows forwarding log entries from one logger to another. | 
| log(ll, condition, args) | This method logs data with the LogLevelof the usedLogger. | 
| log(ll, args) | This function logs data to the used Loggerwith a specificLogLevel. | 
| log(condition, args) | This function logs data to the used Loggerdepending on a
    explicitly passed condition with theLogLevelof the usedLogger. | 
| log(args) | This function logs data to the used Loggerwith theLogLevelof the usedLogger. | 
| logf(ll, condition, msg, args) | This function logs data to the used Loggerwith a specificLogLeveland depending on a condition in aprintf-style manner. | 
| logf(ll, msg, args) | This function logs data to the used Loggerwith a specificLogLevelin aprintf-style manner. | 
| logf(condition, msg, args) | This function logs data to the used Loggerdepending on a
    condition with theLogLevelof the usedLoggerin aprintf-style manner. | 
| logf(msg, args) | This method logs data to the used Loggerwith theLogLevelof the thisLoggerin aprintf-style manner. | 
| opCmp(o) | Compare with another Object obj. | 
| opEquals(o) | Test whether thisis equal too.
 The default implementation only compares by identity (using theisoperator).
 Generally, overrides foropEqualsshould attempt to compare objects by their contents. | 
| toHash() | Compute hash function for Object. | 
| toString() | Convert Object to a human readable string. | 
| finishLogMsg() | Signals that the message has been written and no more calls to logMsgPartfollow. | 
| logMsgPart(msg) | Logs a part of the log message. | 
| writeLogMsg(payload) | A custom logger must implement this method in order to work in a MultiLoggerandArrayLogger. | 
Inner structs
| Name | Description | 
|---|---|
| LogEntry | LogEntry is a aggregation combining all information associated with a log message. This aggregation will be passed to the method writeLogMsg. | 
Aliases
| Name | Description | 
|---|---|
| critical | This template provides the log functions for the Loggerclasswith theLogLevelencoded in the function name. | 
| criticalf | This template provides the log functions for the Loggerclasswith theLogLevelencoded in the function name. | 
| error | This template provides the log functions for the Loggerclasswith theLogLevelencoded in the function name. | 
| errorf | This template provides the log functions for the Loggerclasswith theLogLevelencoded in the function name. | 
| fatal | This template provides the log functions for the Loggerclasswith theLogLevelencoded in the function name. | 
| fatalf | This template provides the log functions for the Loggerclasswith theLogLevelencoded in the function name. | 
| info | This template provides the log functions for the Loggerclasswith theLogLevelencoded in the function name. | 
| infof | This template provides the log functions for the Loggerclasswith theLogLevelencoded in the function name. | 
| trace | This template provides the log functions for the Loggerclasswith theLogLevelencoded in the function name. | 
| tracef | This template provides the log functions for the Loggerclasswith theLogLevelencoded in the function name. | 
| warning | This template provides the log functions for the Loggerclasswith theLogLevelencoded in the function name. | 
| warningf | This template provides the log functions for the Loggerclasswith theLogLevelencoded in the function name. | 
Templates
| Name | Description | 
|---|---|
| memLogFunctions | This template provides the log functions for the Loggerclasswith theLogLevelencoded in the function name. | 
Authors
License
					Copyright © 1999-2022 by the D Language Foundation | Page generated by ddox.