The programmatic way is to use ConfigureAndWatch, or set Watch=true in
your assembly attributes. Why bother to re-invent the wheel?


On 1/4/06, Ofri Sela <[EMAIL PROTECTED]> wrote:
>
>
>
> Hi,
>
>
>
> I would like to write a simple UI tool above the log4net configuration that
> will basically allow me to control the level of logging per a given logger
> or the root itself.
>
> The thing is that I would like to allow this manipulation to take place
> while my application is up and running.
>
>
>
> I'm aware that I can change the file itself and use the "ConfigureAndWatch"
> API from my application but I wonder if there is a programmatic way to do it
> as well.
>
>
>
> So if for example my configuration is as follows:
>
>                         <root>
>
>                                     <level value="WARN" />
>
>                                     <appender-ref ref="MyDBAppender" />
>
>                                     <appender-ref
> ref="MyRollingFileAppender" />
>
>                                     <appender-ref ref="MyAlertsAppender" />
>
>                         </root>
>
>                         <logger name="SomeLogger" additivity="false">
>
>                                     <level value="ERROR" />
>
>                                     <appender-ref ref="MyDBAppender" />
>
>                                     <appender-ref
> ref="MyRollingFileAppender" />
>
>                                     <appender-ref ref="MyAlertsAppender" />
>
>                         </logger>
>
>
>
>
>
> I would like to be able to change the root level from "WARN" to "DEBUG" and
> change the logger called "SomeLogger" level from "ERROR" to "INFO".
>
>
>
> Please advice
>
>
>
>
>
>
>
>
>
> Regards
>
>
>
>
>
> Ofri

Reply via email to