one quick question on this subject btw...
how does GetLogger know to get the AUDIT log if I am throwing a class
type in there as well?
Is that what additivity is?
On 6/29/05, Weston Weems <[EMAIL PROTECTED]> wrote:
> Exactly the kind of thing I was looking for.
>
> On 6/29/05, Ron Grabowski <[EMAIL PROTECTED]> wrote:
> > You could prefix a second logger with AUDIT to differentiate messages
> > coming from the same class:
> >
> > ILog log = LogManager.GetLogger(GetClassName());
> > ILog auditLog = LogManager.GetLogger("AUDIT." + GetClassName());
> >
> > auditLog.Info("The user has logged in.");
> >
> > <logger name="AUDIT" additivity="false">
> > <level value="INFO" />
> > <appender-ref ref="AuditAdoNetAppender" />
> > </logger>
> >
> > --- Weston Weems <[EMAIL PROTECTED]> wrote:
> >
> > > Ok, after re-evaluating my needs... heres what I've decided...
> > >
> > > 1) I need basic logging functionality with normal levels (this much I
> > > can figure out fairly easily)
> > >
> > > 2) I will be using log4net to record audit logging, eg login
> > > failures... and stuff I'll be reporting against so it'll have to be
> > > databased (sql server)
> > >
> > >
> > > I've written configs that will allow me to write extra data to the
> > > logs (fatal gets sent to email appender) etc... and it seems to work
> > > decently, but my question is more for point number 2. What would be
> > > the best way of filtering "more static" logging mechanisms...
> > >
> > > Eg, I want auditing log stuff written to a seperate table. I was told
> > > I can create custom levels, but I'd prefer to stick to using levels
> > > for levels.
> > >
> > > Should I have more than one ILog at any given point in a given
> > > context?
> > >
> > > I know I can achieve my goals, its just by which method etc.
> > >
> >
> >
>