Example #1
0
        public static void AddMsg(string system, int priority, string msg)
        {
            if (!string.IsNullOrEmpty(system))
            {
                AddMsgEventHandler l    = handlers[system] as AddMsgEventHandler;
                LoggerEventArgs    args = new LoggerEventArgs(priority, msg);
                if (l != null)
                {
                    l(null, args);
                }

                l = handlers[""] as AddMsgEventHandler;
                if (l != null)
                {
                    l(null, args);
                }
            }
        }
Example #2
0
 public void Logger_Log(object sender, LoggerEventArgs args)
 {
     Console.Error.Write("there is an error happens with priority {0} and message is {1}", args.Priority, args.Msg);
 }