Ignore an log4net Error in powershell -
Ignore an log4net Error in powershell -
i have issue on script, don't utilize log4net or whatever , im not planning, resource access during script suppose has references log4net, messages:
log4net:error xmlconfigurator: failed find configuration section 'log4net' in application's .config file. check .config file , elements. configuration section should like:
i don't care this, not real error, prefere somehow hide messages propmpt window, possible?
how can ignore information, without much hassle?
this message comes log4net internal debugging, , means not log4net configuration info found in config file. find unusual kind of info opt-in:
there 2 different ways enable internal debugging in log4net. these listed below. preferred method specify log4net.internal.debug
alternative in application's config file.
internal debugging can enabled setting value in application's configuration file (not log4net configuration file, unless log4net config info embedded in application's config file). log4net.internal.debug application setting must set value true. example:
this setting read on startup cause internal debugging messages emitted.
to enable log4net's internal debug programmatically need set log4net.util.loglog.internaldebugging property true. sooner set more debug produced.
so either code of 1 component uses code approach, or there configuration value set true. options are:
look through configuration files reference log4net.internal.debug config key; if find 1 set true, set false. add empty log4net section in configuration file satisfy configurator , prevent complaining if internal debugging set through code, may able redirect console out , trace appenders (see link internal debugging writes to) depends on environment you'll need dig bit more find how grab outputs. not simple powershell log4net
Comments
Post a Comment