Hi

On 2014.02.04 13:24, w...@poczta.fm wrote:
Hi

If You work on port of log4net to Xamarin You may find helpful the patch attached to 
LOG4NET-338 "Port of log4net for MonoDroid" 
(https://issues.apache.org/jira/browse/LOG4NET-338).
I saw Your patch after I was finished. AndroidAppender was almost the same.
My port does not change the structure of the library however some parts may 
still work for You.
I was b bit more "radical" and intrusive, so I split the lib into client profile and non-client profile.

pozdrawiam

Mel

Regards
Wojciech Dec


Od: "Miljenko Cvjetko" <mcvje...@holisticware.net>
Do: log4net-dev@logging.apache.org;
Wysłane: 15:47 Poniedziałek 2014-02-03
Temat: Thoughts on 1.3

Hi

I have tried to post this one through the nabble on Nov 25th and 26th.
My post are still there as "not accepted". Then I got dragged away with
projects, then holidays and again projects. Now I have a bit easier, so
I’d like to add few thoughts.

My name is Miljenko Cvjetko and I'm the one that forked log4net on
GitHub, did some structural changes on the solution/project in order to
"port" it to Xamarin Mobile profiles (Xamarin.iOS and Xamarin.Android)
and contacted Stefan for a permission to submit log4net Xamarin
Component to Xamarin Componet Store.

Stefan asked me whether I can put some thoughts and more light on the
subject in this thread about the Version 1.3.

There were several questions both on mailing-lists and forums about
availability of the log4net for Mono Mobile profiles (Xamarin Mobile)
and I was personally faced with that issue when our team worked on
Application that uses mobile port of SharpSNMP, which uses log4net. The
quick and dirty workaround was to exclude the dependency (and comment it
out).

The era of mobile enterprise apps is about to begin and a lot of code
will be ported from desktop and server side (ASP.net) to mobile in order
to reuse code. Almost all utilities/libraries/tools for .net have
disadvantage/handicap that they are written for desktop and/or ASP.net,
thus using APIs and/or concepts that are not acceptable or possible on
mobile devices. To name some: System.Web assembly (used by log4net) and
Configuration utilities which need Xml support.

What I actually did is simply split log4net into 2 assemblies, the one
with client profile called log4net.client and the other with only
ASP.net specific stuff with old name log4net. The code was
source-linked, so log4net was for external usage the same as it used to be.

All unit tests passed w/o problems.

So I would suggest You to do as Stefan suggested:

1. "to split log4net-13.dll so that the main assembly can be used for
the client profile and a separate assembly contains the stuff that
requires System.Web - this way we no longer need the -cp builds."

2. add separate assemblies for async/await (netfx 4.5, mono 3.x), so
people are not forced into 4.5.

I have worked with log4net on Xamarin's alpha channel for last 2 months
and experienced no problems only stuff I would suggest to add async
wrappers (suggestion 2.).

Also Stefan asked me to merge code into 1.2.x (1.2.13) branch, so I'll
do that in next few days and issue pull request as soon as I'm done. I
will try to be least intrusive, so will probably end up with:

1. src folder with ASP.net project (dependencies), so it is the same for
regression and backward compatibility
2. src-client (or whatever) with client profile - this might be even PCL
- I have to see.
3. src-mobile for iOS and Android assemblies.

Xamarin Component stuff will be added later on.

I hope I did not bother You too much and thank You

best regards

Mel

--
Miljenko Cvjetko dipl.ing. ET
        Direktor/CEO
        Projektant rješenja/Solution Architect  
        Razvojni programer/Senior developer
        Voditelj projekta/Project Manager

IX južna obala 13
Kajzerica Zagreb
T: 385 1 7775555
M: 385 91 557 447 3
F: 385 1 7779556
e: mcvje...@holisticware.net
w: http://holisticware.net






--
Miljenko Cvjetko dipl.ing. ET
        Direktor/CEO
        Projektant rješenja/Solution Architect  
        Razvojni programer/Senior developer
        Voditelj projekta/Project Manager

IX južna obala 13
Kajzerica Zagreb
T: 385 1 7775555
M: 385 91 557 447 3
F: 385 1 7779556
e: mcvje...@holisticware.net
w: http://holisticware.net

Reply via email to