Ejemplo n.º 1
0
        internal DatabaseLogger(string connectionString, Type type)
        {
            try
            {
                _dbContext          = new LoggerContext(connectionString);
                _windowsEventLogger = new WindowsEventLogger();
            }
            catch
            {
                // If anything goes wrong, DatabaseLogger will not throw any exception, just ignore it.
            }

            if (type != null)
            {
                ClassName = type.FullName;
            }
        }
Ejemplo n.º 2
0
 public DatabaseLogger(IDataContext dbContext, IWindowsEventLogger windowsEventLogger)
 {
     _dbContext          = dbContext;
     _windowsEventLogger = windowsEventLogger;
 }