You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-user@logging.apache.org by David Thielen <da...@windward.net> on 2005/09/16 05:04:29 UTC
Calling log4net from J#
Hi;
I'm able to call log4net from J#. But how should I get my Ilog object? There
is no Type attribute in J#.
This works:
private static log4net.ILog log = log4net.LogManager.GetLogger("Program");
But I would like something like:
private static log4net.ILog log =
log4net.LogManager.GetLogger(Program.class);
Thanks - dave
Re: Calling log4net from J#
Posted by Ron Grabowski <ro...@yahoo.com>.
http://www.dotnetjunkies.com/WebLog/sajay/archive/2005/03/11/60012.aspx
private static log4net.ILog log =
log4net.LogManager.GetLogger(Class.ToType(Program.class));
--- David Thielen <da...@windward.net> wrote:
> Hi;
>
>
>
> I'm able to call log4net from J#. But how should I get my Ilog
> object? There
> is no Type attribute in J#.
>
>
>
> This works:
>
> private static log4net.ILog log =
> log4net.LogManager.GetLogger("Program");
>
>
>
> But I would like something like:
>
> private static log4net.ILog log =
> log4net.LogManager.GetLogger(Program.class);
>
>
>
> Thanks - dave
>
>
>
>