public LogData(string InClass, string InMethod, string Description, enmLogType Type) { this._LogType = Type; this._DateTime = System.DateTime.Now; this._Class = InClass; this._Method = InMethod; this._Description = Description; this.IsSystem = false; }
public LogData(string InClass, string InMethod, System.Exception Exception) { this._LogType = enmLogType.Error; this._DateTime = System.DateTime.Now; this._Class = InClass; this._Method = InMethod; this._Exception = Exception; this.IsSystem = false; }
public LogData(string InClass, string InMethod, string Description, bool UserAction) { if (UserAction == true) { this._LogType = enmLogType.UserAction; } else { this._LogType = enmLogType.Action; } this._DateTime = System.DateTime.Now; this._Class = InClass; this._Method = InMethod; this._Description = Description; this.IsSystem = false; }
public Log(bool SqLiteLog, string Param, Dictionary <DataColumn, object> StaticData) { _StaticData = StaticData; if (SqLiteLog == true) { _Writer = new SqLiteWriter(this, Param); } else { _Writer = new FileWriter(Param); } _LogLevel = enmLogType.UserAction; _eMailLevel = enmLogType.None; if (Environment.OSVersion.Platform != PlatformID.WinCE) { try { _eMail = new EMail(this); } catch (Exception ex) { LogData vErrData = new LogData(this.GetType().Name, "New", ex); Write(vErrData); _eMail = null; } } else { _eMail = null; } lock (_Instances) { _Instances.Add(this); } if (_Current == null) { _Current = this; } }
private void Constructor(string ConnectionString, Dictionary <DataColumn, object> StaticData) { if (StaticData == null) { StaticData = new Dictionary <DataColumn, object>(); } _StaticData = StaticData; _Writer = new MsSqlWriter(this, ConnectionString); _LogLevel = enmLogType.UserAction; _eMailLevel = enmLogType.None; if (Environment.OSVersion.Platform != PlatformID.WinCE) { try { _eMail = new EMail(this); } catch (Exception ex) { SysLogData vErrData = new SysLogData(this.GetType().Name, "New", ex); Write(vErrData); _eMail = null; } } else { _eMail = null; } lock (_Instances) { _Instances.Add(this); } if (_Current == null) { _Current = this; } }
public SysLogData(string InClass, string InMethod, string Description, enmLogType Type) : base(InClass, InMethod, Description, Type) { IsSystem = true; }
public void Debug(string InClass, string InMethod, string Message, enmLogType Type) { LogData vData = new LogData(InClass, InMethod, Message, enmLogType.Debug); Write(vData); }