How to add a 3rd party Log framework ( log4net ) to mvvmcross? -
i use log4net in mvvmcross replace mvxdebugtrace, don't want change core source code, possible ?
debugtrace initialised inside setup in initializedebugservices
.
currently implemented on each platform using these steps (example android):
- https://github.com/slodge/mvvmcross/blob/v3/cirrious/cirrious.mvvmcross.droid/platform/mvxandroidsetup.cs#l65
- https://github.com/slodge/mvvmcross/blob/v3/cirrious/cirrious.mvvmcross/platform/mvxsetup.cs#l55
this initialisedebugservices
method marked virtual - can override in own setup.cs class within each platform.
for building bridge mvx log4net, you'll need implement simple imvxtrace
interface - https://github.com/slodge/mvvmcross/blob/v3/crosscore/cirrious.crosscore/platform/imvxtrace.cs
with done... on each platform should able implement myspecialtrace
implements imvxtrace
, , should able initialise in setup using:
protected override void initializedebugservices() { mvx.registersingleton<imvxtrace>(new myspecialtrace()); mvxtrace.initialize(); }
Comments
Post a Comment