log4net.xml

<log4net>
    <appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender">
        <param name="File" value="${appFolder}\${USERNAME}_PureStorage.FlashArray.Backup.log" />
        <param name="AppendToFile" value="true" />
        <param name="RollingStyle" value="Size" />
        <param name="MaxSizeRollBackups" value="10" />
        <param name="MaximumFileSize" value="10MB" />
        <param name="StaticLogFileName" value="true" />
        <lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
        <layout type="log4net.Layout.PatternLayout">
            <param name="ConversionPattern" value="%date [%-5level] - %message%newline" />
        </layout>
    </appender>

    <appender name="EventLogAppender" type="log4net.Appender.EventLogAppender" >
        <applicationName value="PureStorage.FlashArray.Backup" />
        <eventId value="7874" />
        <Threshold value="Error"/>
        <layout type="log4net.Layout.PatternLayout">
            <conversionPattern value="%message" />
        </layout>
    </appender>


    <root>
        <level value="debug" />
        <appender-ref ref="RollingFileAppender" />
        <appender-ref ref="EventLogAppender" />
    </root>
</log4net>