コード例 #1
0
        public static void WriteError(LogData data)
        {
            if (Logger == null)
                Logger = new DbLogger.DbLogger(Environment.CurrentDirectory, "DbFactory");

            Logger.WriteError(data);
        }
コード例 #2
0
        public void WriteWarnng(LogData data)
        {
            data.Type = LogType.Warning;
            data.ExDate = DateTime.Now;

            m_LogDataList.Add(data);
            CreateBallonTipp(data);

            LogToFile();
        }
コード例 #3
0
        public void WriteInfo(LogData data, bool onlyToolTipp = false)
        {
            data.Type = LogType.Info;
            data.ExDate = DateTime.Now;

            CreateBallonTipp(data);
            if (!onlyToolTipp)
            {
                m_LogDataList.Add(data);
                LogToFile();
            }
        }
コード例 #4
0
        public static void WriteInfo(string function, string message, bool onlyBallonTipp = false)
        {
            if (Logger == null)
                Logger = new DbLogger.DbLogger(Environment.CurrentDirectory, "DbFactory");

            var data = new LogData
            {
                FunctionName = function,
                Message = message,
            };

            Logger.WriteInfo(data, onlyBallonTipp);
        }
コード例 #5
0
        public static void WriteWarning(string function, string source, string message)
        {
            if (Logger == null)
                Logger = new DbLogger.DbLogger(Environment.CurrentDirectory, "DbFactory");

            var data = new LogData
            {
                FunctionName = function,
                Source = source,
                Message = message,
            };

            Logger.WriteWarnng(data);
        }
コード例 #6
0
        public void WriteError(LogData data)
        {
            data.Type = LogType.Error;
            data.ExDate = DateTime.Now;

            if (data.Ex != null)
            {
                data.StackTrace = data.Ex.StackTrace;
                data.Message = data.Ex.Message;
            }

            m_LogDataList.Add(data);
            CreateBallonTipp(data);

            LogToFile();
        }
コード例 #7
0
        private void CreateBallonTipp(LogData data)
        {
            var title = string.Empty;

            SLLogEvents.FireShowBallonTipp(new SLLogEventArgs { Type = data.Type, Titel = "DatabaseFactory " + data.Type.ToString() + "!", LogMessage = data.Message });
        }