1 /** 2 * Copyright: (c) 2015-2017, Milofon Project. 3 * License: Subject to the terms of the BSD license, as written in the included LICENSE.txt file. 4 * Authors: Maksim Galanin 5 */ 6 module dango.system.logging; 7 8 public 9 { 10 import dango.system.logging.core : configureLogging; 11 } 12 13 private 14 { 15 import poodinis: ApplicationContext, DependencyContainer; 16 17 import dango.system.logging.core; 18 import dango.system.logging.loggers.console; 19 import dango.system.logging.loggers.file; 20 import dango.system.logging.loggers.html; 21 22 import dango.system.container: registerByName; 23 } 24 25 /** 26 * Контекст для регистрации компонентов отвечающих к логированию 27 */ 28 class LoggingContext : ApplicationContext 29 { 30 public override void registerDependencies(shared(DependencyContainer) container) 31 { 32 container.registerByName!(LoggerFactory, FileLoggerFactory)("FILE"); 33 container.registerByName!(LoggerFactory, HTMLLoggerFactory)("HTML"); 34 container.registerByName!(LoggerFactory, ConsoleLoggerFactory)("CONSOLE"); 35 } 36 }