switch to a new logging framework (Log4Net) (1 Viewer)

gibman

Retired Team Member
  • Premium Supporter
  • October 4, 2006
    2,998
    1,372
    Aarhus
    Home Country
    Denmark Denmark
    Once this is done I could goldplate it with the above mentioned threading model for performace goals

    If log4net is any sane logging framework it already should have the actual loggin in a separate thread and only the message queuing is done in the calling thread. Bavarian probably knows if this is the case.
    I thought about this too .. although I couldn't find any evidence of this.
    ofc. I could try look for the actual code. again I spent 2 min. only google'ing it.

    if it's done right, it would support multiple threads writing to the log. it would also make sure the logs are written to disk in the sequence they came in.

    /gibman
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    iloop, someone still needs to implement the log levels for every single logging call on TVE side for the verbose to work.
    I can do this.
    @gibman:
    Is it OK for you to merge this branch with your TVE3.5 branch?
    If yes, who will do it?

    yeah feel free to do it :)

    just remember there are 2 tve3.5 branches .. confusing right ?
    @Sebastiii knows more about this :)

    Once this is done I could goldplate it with the above mentioned threading model for performace goals.

    /gibman

    Now only one is in Github :)
     

    Bavarian

    Retired Team Member
  • Premium Supporter
  • April 4, 2005
    698
    167
    Germany, Bayern
    Home Country
    Germany Germany
    just remember there are 2 tve3.5 branches .. confusing right ?
    @Sebastiii knows more about this :)

    Once this is done I could goldplate it with the above mentioned threading model for performace goals.
    /gibman

    Now only one is in Github :)

    Can you please point me to the correct one, because I still see this two branches:
    - EXP-TV3.5_MP_NET4
    - EXP-TV-MP-TV3.5-NET4
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    EXP-TV3.5_MP_NET4 is the right one. On remote the other branch should be gone?
     

    Bavarian

    Retired Team Member
  • Premium Supporter
  • April 4, 2005
    698
    167
    Germany, Bayern
    Home Country
    Germany Germany
    hmm :confused: - maybe I understood the request wrong :confused:

    The directory structures of the two branches are different, therefore a merge makes no sense.

    What I can do is to implement my changes in this EXP-TV3.5_MP_NET4 branch once again.
    But then then FEAT-3273-Switch_to_log4net branch should not be merged to the master. It would be better to delete it.
    Or does anybody (with better git skills then me) knows a better solution?
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    The directory structures of the two branches are different, therefore a merge makes no sense.

    What I can do is to implement my changes in this EXP-TV3.5_MP_NET4 branch once again.
    But then then FEAT-3273-Switch_to_log4net branch should not be merged to the master. It would be better to delete it.
    Or does anybody (with better git skills then me) knows a better solution?

    EXP-TV3.5_MP_NET4 branch is something that has diverset quite much from the master so direct merges arent possible. FEAT-3273-Switch_to_log4net should be merget to master once it is ready for such (testing and approval). If EXP-TV3.5_MP_NET4 will be part of 1.4.0 then there will be lot of manual merging in any case :)
     

    gibman

    Retired Team Member
  • Premium Supporter
  • October 4, 2006
    2,998
    1,372
    Aarhus
    Home Country
    Denmark Denmark
    about logging exceptions vs code cleanliness.

    http://stackoverflow.com/questions/7046399/inject-logging-dependency-with-castle-windsor

    just add a attribute to the method u want logged in case of exceptions and avoid the usual code noise with try-catch exceptions.

    now thats nice :)

    Another thing is -- at work I'm currently replacing a hardcoded logging impl. with an abstracted impl.
    We want to be able to change to any kind of logging framework per app config.

    I figured the castle windsor (CW) framework had some logging framework abstraction possibilities.

    and it had :=)

    <facilities>

    <!--- log4net logging, see log.config for log4net options -->
    <!--
    <facility id="loggingfacility"
    type="Castle.Facilities.Logging.LoggingFacility, Castle.Facilities.Logging"
    loggingApi="log4net"
    configFile="log.config"
    />
    -->

    so when I use CW to resolve a registered assembly/class they will get an instance of ILogger injected into its constructor.

    very neat indeed.
    CW has these inbuilt abstractions for the following logging frameworks.

    loggingApi="null|console|diagnostics|web|nlog|log4net|custom"

    with the 'custom' one we can create our own logger in the future and replace it real easy like.

    /gibman
     
    Last edited:

    elliottmc

    Retired Team Member
  • Premium Supporter
  • August 7, 2005
    14,927
    6,061
    Cardiff, UK
    Home Country
    United Kingdom United Kingdom
    In terms of getting this fix/change scheduled for a release, where are we?
     

    Users who are viewing this thread

    Top Bottom