FileAppender LockingModelBase OpenFile Method | Apache log4net™ SDK Documentation

Open the output file

Namespace: log4net.Appender
Assembly: log4net (in log4net.dll) Version: 2.0.8.0-.NET 4.0
Syntax

C#
VB
C++
F#
Copy

    public abstract void OpenFile(
    	string filename,
    	bool append,
    	Encoding encoding
    )

    Public MustOverride Sub OpenFile (
    	filename As String,
    	append As Boolean,
    	encoding As Encoding
    )

    public:
    virtual void OpenFile(
    	String^ filename,
    	bool append,
    	Encoding^ encoding
    ) abstract

    abstract OpenFile :
            filename : string *
            append : bool *
            encoding : Encoding -> unit

#### Parameters

filename
  Type: System
  String
  The filename to use
append
  Type: System
  Boolean
  Whether to append to the file, or overwrite
encoding
  Type: System.Text
  Encoding
  The encoding to use

Remarks

Open the file specified and prepare for logging. No writes will be made until AcquireLock
is called. Must be called before any calls to AcquireLock
, ReleaseLock
and CloseFile
.

See Also

#### Reference

FileAppender
LockingModelBase Class
log4net.Appender Namespace