You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-cs@ibatis.apache.org by Bevan Arps <Be...@rbnz.govt.nz> on 2005/09/01 00:05:46 UTC

RE: ibatis used dated log4net dll

Thanks for the quick response Ron.

> It should work with MLIEAB. I was planning on writing an adapter
> eventually. You'll need to implement these two interfaces ...

Thanks for the pointer - on first inspection, doesn't look like a big
problem.

I won't be able to start on this for a few weeks - when I do, I'll touch
base with you first to avoid duplicating the effort.

> I'm curious why you need to replace log4net with MLIEAB? 

The decision wasn't based only on technical merit - a number of other
factors were significant. Unfortunately, I'm not free to discuss the
details in an open forum.

We've standardised on MLIEAB for our logging - the dependency of the
IBatis Datamapper on log4net was a stumbling block for me in getting
approval for use. Being able to remove the dependencie is a big deal -
thanks to you and whoever else was involved in achieving this.

Keep Smiling,
Bevan.


******************************************************************************
"This message (and any files transmitted with it) are confidential and 
may be legally privileged. If you are not the intended recipient please
notify the sender immediately and delete this message from your system.

This message does not necessarily reflect the views of the
Reserve Bank of New Zealand. If the recipient has any concerns
about the content of this message they should seek alternative
confirmation from the Reserve Bank of New Zealand."
******************************************************************************




Re: ibatis used dated log4net dll

Posted by Gilles Bayon <ib...@gmail.com>.
Crazy idea but funny, I note it
:-)

 On 9/1/05, Ron Grabowski <ro...@yahoo.com> wrote: 
> 
> There is still a slight dependency on log4net. IBatisNet.Common has a
> reference to the log4net assembly becuase of the Log4NetLogger and
> Log4NetLoggerFA classes in IBatisNet.Common.Loggging.Impl. Ideally
> those two classes would be in their own assembly.
> 
> A creative alternative that may solve the problem of having a reference
> to log4net and/or requiring the user to keep a seperate
> "Log4NetFactoryAdapter.dll" file around would be to ship with
> "Log4NetFactoryAdapter.dll" embedded into the IBatisNet.Common
> assembly. At runtime we could extract the resource as a stream, convert
> it into a byte[] then load the assembly using this overload:
> 
> public static Assembly Load(byte[] rawAssembly);
> 
> The "Log4NetFactoryAdapter.dll" assembly may even be small enough (the
> two classes are approx 16,384 bytes) to ship with several popular
> adapters:
> 
> Log4NetFactoryAdapter-1.2.0.30714.dll
> Log4NetFactoryAdapter-1.2.0.9.dll
> Log4NetFactoryAdapter-1.3.0.0.dll
> NLogFactoryAdapater-0.5.0.0.dll
> NLogFactoryAdapater-0.9.1.0.dll
> NLogFactoryAdapater-1.0.0.0.dll
> MLIEAB-0.0.0.0.dll
> 
> The entry in the app.config might look something like this:
> 
> <iBATIS>
> <logging>
> <logFactoryAdapter
> type="IBatisNet.Common.Logging.Impl.FactoryAdapterLoader,
> IBatisNet.Common">
> <arg key="resource" value="Log4NetFactoryAdapter-1.2.0.9.dll" />
> </logFactoryAdapter>
> </logging>
> </iBATIS>
> 
> How's that for a crazy idea :-)
> 
> --- Bevan Arps <Be...@rbnz.govt.nz> wrote:
> 
> > Thanks for the quick response Ron.
> >
> > > It should work with MLIEAB. I was planning on writing an adapter
> > > eventually. You'll need to implement these two interfaces ...
> >
> > Thanks for the pointer - on first inspection, doesn't look like a big
> > problem.
> >
> > I won't be able to start on this for a few weeks - when I do, I'll
> > touch
> > base with you first to avoid duplicating the effort.
> >
> > > I'm curious why you need to replace log4net with MLIEAB?
> >
> > The decision wasn't based only on technical merit - a number of other
> > factors were significant. Unfortunately, I'm not free to discuss the
> > details in an open forum.
> >
> > We've standardised on MLIEAB for our logging - the dependency of the
> > IBatis Datamapper on log4net was a stumbling block for me in getting
> > approval for use. Being able to remove the dependencie is a big deal
> > -
> > thanks to you and whoever else was involved in achieving this.
> >
> > Keep Smiling,
> > Bevan.
> >
> >
> >
> 
> ******************************************************************************
> > "This message (and any files transmitted with it) are confidential
> > and
> > may be legally privileged. If you are not the intended recipient
> > please
> > notify the sender immediately and delete this message from your
> > system.
> >
> > This message does not necessarily reflect the views of the
> > Reserve Bank of New Zealand. If the recipient has any concerns
> > about the content of this message they should seek alternative
> > confirmation from the Reserve Bank of New Zealand."
> >
> 
> ******************************************************************************
> >
> >
> >
> >
> 
>

RE: ibatis used dated log4net dll

Posted by Ron Grabowski <ro...@yahoo.com>.
There is still a slight dependency on log4net. IBatisNet.Common has a
reference to the log4net assembly becuase of the Log4NetLogger and
Log4NetLoggerFA classes in IBatisNet.Common.Loggging.Impl. Ideally
those two classes would be in their own assembly.

A creative alternative that may solve the problem of having a reference
to log4net and/or requiring the user to keep a seperate
"Log4NetFactoryAdapter.dll" file around would be to ship with
"Log4NetFactoryAdapter.dll" embedded into the IBatisNet.Common
assembly. At runtime we could extract the resource as a stream, convert
it into a byte[] then load the assembly using this overload:

 public static Assembly Load(byte[] rawAssembly);

The "Log4NetFactoryAdapter.dll" assembly may even be small enough (the
two classes are approx 16,384 bytes) to ship with several popular
adapters:

 Log4NetFactoryAdapter-1.2.0.30714.dll
 Log4NetFactoryAdapter-1.2.0.9.dll
 Log4NetFactoryAdapter-1.3.0.0.dll
 NLogFactoryAdapater-0.5.0.0.dll
 NLogFactoryAdapater-0.9.1.0.dll
 NLogFactoryAdapater-1.0.0.0.dll
 MLIEAB-0.0.0.0.dll

The entry in the app.config might look something like this:

<iBATIS>
 <logging>
  <logFactoryAdapter
type="IBatisNet.Common.Logging.Impl.FactoryAdapterLoader,
IBatisNet.Common">
  <arg key="resource" value="Log4NetFactoryAdapter-1.2.0.9.dll" />
  </logFactoryAdapter>
 </logging>
</iBATIS>

How's that for a crazy idea :-)

--- Bevan Arps <Be...@rbnz.govt.nz> wrote:

> Thanks for the quick response Ron.
> 
> > It should work with MLIEAB. I was planning on writing an adapter
> > eventually. You'll need to implement these two interfaces ...
> 
> Thanks for the pointer - on first inspection, doesn't look like a big
> problem.
> 
> I won't be able to start on this for a few weeks - when I do, I'll
> touch
> base with you first to avoid duplicating the effort.
> 
> > I'm curious why you need to replace log4net with MLIEAB? 
> 
> The decision wasn't based only on technical merit - a number of other
> factors were significant. Unfortunately, I'm not free to discuss the
> details in an open forum.
> 
> We've standardised on MLIEAB for our logging - the dependency of the
> IBatis Datamapper on log4net was a stumbling block for me in getting
> approval for use. Being able to remove the dependencie is a big deal
> -
> thanks to you and whoever else was involved in achieving this.
> 
> Keep Smiling,
> Bevan.
> 
> 
>
******************************************************************************
> "This message (and any files transmitted with it) are confidential
> and 
> may be legally privileged. If you are not the intended recipient
> please
> notify the sender immediately and delete this message from your
> system.
> 
> This message does not necessarily reflect the views of the
> Reserve Bank of New Zealand. If the recipient has any concerns
> about the content of this message they should seek alternative
> confirmation from the Reserve Bank of New Zealand."
>
******************************************************************************
> 
> 
> 
>