Support

Kom i kontakt med vår kundtjänst, lär dig allt via vår SDK eller ladda ner den senaste uppdateringen.

How do you write to the errlog?

2010-10-07 15:56:47 Paulo

which methods and in which class/namespace can I find them? thx! /P

All replies

  • 2010-10-08 10:06:11 Magnus Krona

    Example:

    private static readonly ILog _log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);

    _log.Error("This will be logged!"); 

  • 2010-10-08 10:09:32 Magnus Krona
    Magnus Krona wrote:

    Example:

    private static readonly ILog _log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);

    _log.Error("This will be logged!"); 


    using log4net;

  • 2010-10-11 12:11:19 Paulo

    Cool! Thx for the tip! Will try it out when I get the chance. /P