Flushes any buffered log data.
Namespace: log4net.Appender
Assembly: log4net (in log4net.dll) Version: 2.0.6.0-.NET 4.0
Syntax
Parameters
- millisecondsTimeout
- Type: SystemInt32
The maximum time to wait for logging events to be flushed.
Return Value
Type: BooleanTrue if all logging events were flushed successfully, else false.
Remarks
Typically this is done by locking on the Appender instance, e.g.:
public bool Flush(int millisecondsTimeout) { lock(this) { // Flush buffered logging data ... } }
The millisecondsTimeout parameter is only relevant for appenders that process logging events asynchronously, such as RemotingAppender.
See Also