/// <summary> /// Through this we use the logging system. We can choose which type of logger do we want to use. /// </summary> /// <param name="logType"></param> /// <param name="what">Which class caused the error</param> /// <param name="command">Which command caused the error</param> /// <param name="message">The meassage of the exception</param> public void Log(LogType logType, string what, string command, string message) { switch (logType) { case LogType.DbLog: logger = new DBLog(); break; case LogType.FileLog: logger = new FileLog(); break; default: break; } logger.Log(what, command, message); }
public ProductManager(Factory factory) { _factory = factory; _caching = _factory.CreateCacher(); _logging = _factory.CreateLogger(); }