Ejemplo n.º 1
0
 static public CSharpLogger Log(string filename = null, bool append = false, string datetimeformat = "h:mm:ss tt")
 {
     if (Instance == null)
     {
         Instance = new CSharpLogger(filename, append, datetimeformat);
     }
     return(Instance);
 }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            //Call this first if you want the log in a file.
            //CSharpLogger.Log(@"C:\Users\diego.DESKTOP-LECRLQ6\Desktop\testing.log");

            CSharpLogger.Log().Trace("Tracing text");
            CSharpLogger.Log().Debug("Debugging text");
            CSharpLogger.Log().Info("Info text");
            CSharpLogger.Log().Error("Error text");
            CSharpLogger.Log().Warning("Warning text");
            Console.ReadKey();
        }