Unless someone has a better idea, I think your best bet is to make a
very very simple J# console app that demonstrates your problem and make
it available for download somewhere (or email me off list) so we can
play around with it. Perhaps zip containing a directory with the
necessary files and the .sln file? Don't forget to include the
necessary .jar files (log4j.jar ???)
--- David Thielen <[EMAIL PROTECTED]> wrote:
> Hi;
>
>
>
> I am writing a J# wrapper around log4net. I am doing this by
> implementing
> the public classes in log4j using it's package/names so my java code
> is
> common source between java and J#.
>
>
>
> I have it working except it uses the file name & line number from my
> Logger.jsl instead of the app that calls my logger.
>
>
>
> I can't inherit from LoggerWrapperImpl because that is a C# class.
> (Would be
> cool if you could do that.)
>
>
>
> So I did the following:
>
>
>
> public class Logger
>
> {
>
> private log4net.ILog log;
>
> private Logger(Class appClass)
>
> {
>
> log =
> log4net.LogManager.GetLogger(Class.ToType(appClass));
>
> }
>
> public void error(Object message)
>
> {
>
> log.Error(message);
>
> }
>
> }
>
>
>
> Which works fine, but has the filename/line number problem. So I then
> tried:
>
> public void error(Object message)
>
> {
>
> ((log4net.Core.LogImpl)log).get_Logger().Log(type,
> log4net.Core.Level.Error, "again" + message, null);
>
> }
>
>
>
> Which gave the app domain as the filename and 0 as the line number.
>
>
>
> So...
>
>
>
> Any suggestions on what to try next?
>
>
>
> Thanks - dave
>
>
>
>