Beispiel #1
0
        public void Save()
        {
            Console.WriteLine("Saved");
            ILogger logger = new LoggerFactory2().CreateLogger();

            logger.Log();
        }
Beispiel #2
0
        public void Add()
        {   //LoggerFactory veya LoggerFactory2 olarak loglama sistemini 2 farklı şekilde kullanabiliriz.
            //Dependency Injection kullanarak da yapabilirdik.
            Console.WriteLine("Added!!!");
            ILogger logger = new LoggerFactory2().CreateLogger();

            logger.Log();
        }
Beispiel #3
0
        static void Main(string[] args)
        {
            LoggerFactory2 factory = new LoggerFactory2();
            Logger         logger  = factory.getLogger();

            logger.Log("Esto es un mensaje");
            Console.ReadKey();
            //Establezca el parámetro FileLogging=ON y ejecute nuevamente la aplicación
        }