public VehicleArticleManager(string user) { Logger = LogManager.GetLogger(typeof(VehicleArticleManager)); dbScopeManagerConfiguration = new DBScopeManager(configurationConn); dbScopeManagerConfigurationRead = new DBScopeManager(configurationReadConn); _user = user; }
public VendorProductCouponPriceManager() { Logger = LogManager.GetLogger(typeof(VendorProductCouponPriceManager)); dbScopeManagerConfiguration = new DBScopeManager(configurationConn); dbScopeManagerConfigurationRead = new DBScopeManager(configurationReadConn); _dal = new DalVendorProductCouponPriceConfig(); _vendorProductService = new VendorProductService(); }
static PaintDiscountConfigManager() { Logger = LogManager.GetLogger(typeof(PaintDiscountConfigManager)); dbScopeManagerConfiguration = new DBScopeManager(configurationConn); dbScopeManagerConfigurationRead = new DBScopeManager(configurationReadConn); dbScopeManagerProductcatalogRead = new DBScopeManager(productcatalogReadConn); dbScopeManagerTuhulog = new DBScopeManager(tuhuLogConn); }
public BatteryCouponPriceDisplayManager(string user) { Logger = LogManager.GetLogger(typeof(BatteryCouponPriceDisplayManager)); dbScopeManagerConfiguration = new DBScopeManager(configurationConn); dbScopeManagerConfigurationRead = new DBScopeManager(configurationReadConn); _user = user; _dal = new DalBatteryCouponPriceDisplay(); }
static VehicleAnnualInspectionAgentManager() { Logger = LogManager.GetLogger(typeof(VehicleAnnualInspectionAgentManager)); dbScopeManagerGungnirRead = new DBScopeManager(gungnirReadConn); dbScopeManagerConfiguration = new DBScopeManager(configurationConn); dbScopeManagerConfigurationRead = new DBScopeManager(configurationReadConn); dbScopeManagerProductcatalogRead = new DBScopeManager(productcatalogReadConn); dbScopeManagerTuhulog = new DBScopeManager(tuhuLogConn); }
private static void LogPrint(LoggingCommon.ILog log) { log.Info("info message"); log.Error(new InvalidDataException("just testing")); log.Debug("debug message"); log.Warn("warn message"); log.Error("error message"); log.Fatal("fatal message"); }
public VendorProductCoverAreaManager() { _dbScopeManagerConfig = new DBScopeManager(configConnRo); _dbScopeManagerConfigRead = new DBScopeManager(configReadConnRo); _dal = new DalVendorProductCoverArea(); _baoYangManager = new BaoYangManager(); _regionService = new RegionService(); _logger = LogManager.GetLogger(typeof(VendorProductCoverAreaManager)); _vendorProductService = new VendorProductService(); }
public DianpingManager() { this.thirdpartyConnection = new ConnectionManager(ConfigurationManager.ConnectionStrings["ThirdParty"].ConnectionString); this.dbScopeManager = new DBScopeManager(thirdpartyConnection); this.thirdpartyReadConnection = new ConnectionManager(ConfigurationManager.ConnectionStrings["ThirdPartyReadOnly"].ConnectionString); this.dbScopeReadManager = new DBScopeManager(thirdpartyReadConnection); this.dalGroupConfig = new DalGroupConfig(); this.dalShopConfig = new DalShopConfig(); this.logger = LogManager.GetLogger(typeof(DianpingManager)); }
public void LoadLogger() { lock (_logLock) { var hierarchy = (Hierarchy)log4net.LogManager.GetRepository(); var logger = log4net.LogManager.GetLogger(LoggerName); hierarchy.Root.Level = Level.All; hierarchy.Configured = true; _logger = new CodeConfigurableLog4NetLogger(logger); } }
public void LoadLogger() { lock (_logLock) { var hierarchy = (Hierarchy)log4net.LogManager.GetRepository(); var logger = log4net.LogManager.GetLogger(LoggerName); hierarchy.Root.Level = Level.All; hierarchy.Configured = true; _logger = new CodeConfigurableLog4NetLogger(logger); } }
public void ConfigureAppender(AppenderSkeleton appender) { var hierarchy = (Hierarchy)log4net.LogManager.GetRepository(); var logger = log4net.LogManager.GetLogger(LoggerName); appender.Layout = new PatternLayout(GetLogPattern(_logLevel)); appender.Threshold = hierarchy.LevelMap[_logLevel.ToString().ToUpper(CultureInfo.CurrentCulture)]; hierarchy.Root.AddAppender(appender); hierarchy.Root.Level = Level.All; hierarchy.Configured = true; _logger = new CodeConfigurableLog4NetLogger(logger); }
public InstallTypeConfigManager() { this.connectionManager = new ConnectionManager(ConfigurationManager.ConnectionStrings["Gungnir"].ConnectionString); this.dbScopeManager = new DBScopeManager(this.connectionManager); this.connectionManagerRead = new ConnectionManager(ConfigurationManager.ConnectionStrings["Gungnir_AlwaysOnRead"].ConnectionString); this.dbScopeManagerRead = new DBScopeManager(this.connectionManager); this.dalInstallType = new DalBaoYangInstallTypeConfig(); this.logger = LogManager.GetLogger(typeof(InstallTypeConfigManager)); }
/// <summary> /// 消息輸出 /// </summary> /// <param name="message">消息</param> /// <param name="level">級別</param> /// <param name="exception">異常對象</param> public void Output(string message, MessageLevel level, Exception exception) { Common.Logging.ILog logger = LogManager.GetLogger(GetType()); switch (level) { case MessageLevel.Trace: if (logger.IsTraceEnabled) { logger.Trace(message, exception); } break; case MessageLevel.Debug: if (logger.IsDebugEnabled) { logger.Debug(message, exception); } break; case MessageLevel.Info: if (logger.IsInfoEnabled) { logger.Info(message, exception); } break; case MessageLevel.Warn: if (logger.IsWarnEnabled) { logger.Warn(message, exception); } break; case MessageLevel.Error: if (logger.IsErrorEnabled) { logger.Error(message, exception); } break; case MessageLevel.Fatal: if (logger.IsFatalEnabled) { logger.Fatal(message, exception); } break; } }
public static void LogEx(this Common.Logging.ILog log, Common.Logging.LogLevel level, Action <TraceRecord> traceAction, [CallerMemberName] string member = "", [CallerLineNumber] int line = 0) { // Check if this log level is enabled if (level == LogLevel.Trace && log.IsTraceEnabled == false || level == LogLevel.Debug && log.IsDebugEnabled == false || level == LogLevel.Info && (log.IsInfoEnabled == false) || level == LogLevel.Warn && (log.IsWarnEnabled == false) || level == LogLevel.Error && (log.IsErrorEnabled == false) || level == LogLevel.Fatal && (log.IsFatalEnabled == false)) { return; } TraceRecord tr = new TraceRecord() { Level = level }; traceAction(tr); string message = String.Format("{0}() line {1}: {2}.{3}", member, line, tr.Message, (tr.Data != null) ? Newtonsoft.Json.JsonConvert.SerializeObject(tr.Data) : ""); switch (level) { case LogLevel.Trace: log.Trace(message, tr.Exception); break; case LogLevel.Debug: log.Debug(message, tr.Exception); break; case LogLevel.Error: log.Error(message, tr.Exception); break; case LogLevel.Fatal: log.Fatal(message, tr.Exception); break; case LogLevel.Info: log.Info(message, tr.Exception); break; case LogLevel.Warn: log.Warn(message, tr.Exception); break; } }
public ReplEngineWrapper(ILog logger, Repl repl, MemoryBufferConsole console) { this.logger = logger; this.repl = repl; this.console = console; }
public static void ErrorEx(this Common.Logging.ILog log, Action <TraceRecord> traceAction, [CallerMemberName] string member = "", [CallerLineNumber] int line = 0) { LogEx(log, LogLevel.Error, traceAction, member, line); }
public static void WarnEx(this Common.Logging.ILog log, String message, [CallerMemberName] string member = "", [CallerLineNumber] int line = 0) { LogEx(log, LogLevel.Warn, ta => { ta.Message = message; }, member, line); }
//private public ReplEngineWrapper(ILog logger, ScriptState <object> repl, MemoryBufferConsole console) { this.logger = logger; this.repl = repl; this.console = console; }
public MSCommonLoggingProvider(CL.ILog logger, ML.LogLevel notBelow = ML.LogLevel.Information) { this.logger = logger; this.notBelow = notBelow; }
/// <summary> /// Initializes a new instance of the <see cref="Log"/> class. /// </summary> public Log() { _logger = LogManager.GetLogger("Logger"); }
public void Configure(IConsole console) { _logger = new ScriptConsoleLogger(_logLevel, console, LogManager.GetLogger(LoggerName)); }
public VendorProductCommonManager() { _logger = LogManager.GetLogger(typeof(VendorProductCommonManager)); }
public ReplEngineFactory(ILog logger, string[] args) { this._logger = logger; this.args = args; }
static BaoYangPackageTypeRelationManager() { Logger = LogManager.GetLogger(typeof(BaoYangPackageTypeRelationManager)); dbScopeManagerBaoYang = new DBScopeManager(baoyangConn); dbScopeManagerBaoYangRead = new DBScopeManager(baoyangReadConn); }
private CommonLoggingLoggerProxy(Common.Logging.ILog logger) { _commonLogginLogger = logger; }
/// <inheritdoc /> protected BaseServerRequestHandler([NotNull] ILog logger) { Logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
public void Configure(IConsole console) { _logger = new ScriptConsoleLogger(_logLevel, console, LogManager.GetLogger(LoggerName)); }
public ReplEngineFactory(ILog logger, string[] args) { this._logger = logger; this.args = args; }
static UploadFileManager() { logger = LogManager.GetLogger(typeof(UploadFileManager)); dbScopeManagerTuhulog = new DBScopeManager(tuhuLogConn); }
public ReplEngineWrapper(ILog logger, Repl repl, MemoryBufferConsole console) { this.logger = logger; this.repl = repl; this.console = console; }