Exemplo n.º 1
0
        public static void WriteError(LogData data)
        {
            if (Logger == null)
                Logger = new DbLogger.DbLogger(Environment.CurrentDirectory, "DbFactory");

            Logger.WriteError(data);
        }
Exemplo n.º 2
0
        public void WriteWarnng(LogData data)
        {
            data.Type = LogType.Warning;
            data.ExDate = DateTime.Now;

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

            LogToFile();
        }
Exemplo n.º 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();
            }
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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();
        }
Exemplo n.º 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 });
        }