Esempio n. 1
0
    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;
    }
Esempio n. 2
0
    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;
    }
Esempio n. 3
0
    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;
    }
Esempio n. 4
0
File: Log.cs Progetto: v1i1/proekt
        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;
            }
        }
Esempio n. 5
0
    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;
        }
    }
Esempio n. 6
0
 public SysLogData(string InClass, string InMethod, string Description, enmLogType Type)
     : base(InClass, InMethod, Description, Type)
 {
     IsSystem = true;
 }
Esempio n. 7
0
    public void Debug(string InClass, string InMethod, string Message, enmLogType Type)
    {
        LogData vData = new LogData(InClass, InMethod, Message, enmLogType.Debug);

        Write(vData);
    }