public static void Log(LogTarget target, string message) { switch (target) { case LogTarget.File: logger = new FileLogger("Logger.txt"); logger.Log(message); break; case LogTarget.Console: logger = new ConsoleLogger(); logger.Log(message); break; case LogTarget.EventLog: logger = new EventLogger(); logger.Log(message); break; default: return; } }
public static void Log(LogTarget target, string message, Level level) { switch (target) { case LogTarget.File: logger = new FileLogger(@"C:\Users\accountant.AHM\Desktop\testsig\pdfin"); logger.Log(message, level); break; case LogTarget.Database: logger = new DBLogger(); logger.Log(message, level); break; case LogTarget.EventLog: logger = new EventLogger(); logger.Log(message, level); break; default: return; } }
public static void Log(Level level, string message) { logger.Log(level, message); }
public static void Log(string fileName, string message) { Logger.Log(fileName, message); }