Пример #1
0
        static void Main(string[] args)
        {
            InterfaceLogger allLogger = new AllLogger(".\\log.txt", LogOutput.OutputToBoth);

            //we add an enum
            allLogger.Log("===== Final Start =====");

            Thread.Sleep(3000);

            allLogger.Log("===== Final End =====");
        }
Пример #2
0
        static void Main(string[] args)
        {
            ConsoleLogger.Log("Hello World!");
            FileLogger.LogToFile(".//log.txt", "Hello World!");

            /*
             * ConsoleLogger.Log("Program Started!");
             * FileLogger.LogToFile(".\\log.txt", "Program Started!");
             */
            AllLogger.Log(".\\log.txt", "Program Started!");

            //Simulating work by having the program sleep for 3 seconds
            Thread.Sleep(3000);

            /*
             * ConsoleLogger.Log("Program Ender!");
             * FileLogger.LogToFile(".\\log.txt", "Program Ended!");
             */
            AllLogger.Log(".\\log.txt", "Program Ended!");
        }