static void Main(string[] args)
        {
            ILogger fileLogger = new FileLogger();
            ILogger dbLogger   = new DatabaseLogger();

            fileLogger.Log("Writing to file.");
            dbLogger.Log("Writing to the database.");

            fileLogger.Log(new Exception("Oops, something went wrong..."));
            dbLogger.Log(new Exception("Oops, something went wrong..."));
        }
Пример #2
0
        static void Main(string[] args)
        {
            ILogger fileLogger = new FileLogger();
            ILogger dbLogger   = new DatabaseLogger();

            fileLogger.Log("Writing to file.");
            dbLogger.Log("Writing to the database.");
        }