I am using log4net and in one class require logging to a RollingFile appender, but then in another class, I wish to log to the event log + rolling file + console appender.
You can do this by applying a filter to an appender. Only if the log event passes the filter does the event get logged by that appender.
This filter configuration will log only those events coming from the logger named "MyLogger":
<appender name="EventLogAppender" ...
<filter type="log4net.Filter.LoggerMatchFilter">
<loggerToMatch value="MyLogger" />
</filter>
<filter type="log4net.Filter.DenyAllFilter" />
</appender>
...and this one will match log messages with certain contained text:
<filter type="log4net.Filter.StringMatchFilter">
<stringToMatch value="database" />
</filter>
<filter type="log4net.Filter.DenyAllFilter" />
There's a good bit of configuration possible with filters. See the log4net SDK, or the Filters section of the manual, for more details.