public static string createMessage(string message, LoggerSource source) { try { string user=HttpContext.Current.User.Identity.IsAuthenticated ? HttpContext.Current.User.Identity.Name : "Anonimous"; string ip= HttpContext.Current.Request.UserHostAddress; return String.Format("{0,-30} {1,-15} {2,-20} {3}", user, ip, source.ToString(), message); }catch{ return String.Format("{0,-30} {1,-15} {2,-20} {3}", "", "", source.ToString(), message);; } }
public static string createMessage(string message, LoggerSource source) { string msg = String.Format("{1}", source.ToString(), message); try { rbText.Text = msg + "\r\n" + rbText.Text; rbText.InvalidateArrange(); } catch { } return(msg); }
protected virtual string createMessage(string message, LoggerSource source = LoggerSource.none) { if (source != LoggerSource.none) { return(String.Format("{0,-10} {1}", source.ToString(), message)); } else { return(String.Format("{0}", message)); } }
public static string createMessage(string message, LoggerSource source) { try { //string user= OrdersUser.getCurrentUser().FullName; //string ip= HttpContext.Current.Request.UserHostAddress; string ip = ""; return(String.Format("{0,-30} {1,-15} {2,-20} {3}", "", ip, source.ToString(), message)); }catch { return(String.Format("{0,-30} {1,-15} {2,-20} {3}", "", "", source.ToString(), message));; } }
public static string createMessage(string message, LoggerSource source) { try { Console.WriteLine(message); } catch { } try { return String.Format("{0,-20} {1}", source.ToString(), message); } catch { return ""; } }
protected override void info(string str, LoggerSource source = LoggerSource.server) { Console.WriteLine(createMessage(str, source)); }
public void SetUp() { AppDomain.CurrentDomain.SetData("APPBASE", WebsitePhysicalAppPath); LoggerSource.SetTestableInstance(new TestLogSource()); }
public static void debug(string str, LoggerSource source) { logger.Debug(createMessage(str,source)); }
public static void error(string str, LoggerSource source) { logger.Error(createMessage(str,source)); }
public static void info(string str, LoggerSource source) { logger.Info(createMessage(str,source)); }
public static void Debug(string str, LoggerSource source = LoggerSource.none) { Logger.checkFileLogger(); context.info(str, source); }
protected virtual void debug(string str, LoggerSource source = LoggerSource.none) { try { logger.Debug(createMessage(str, source)); } catch { } Console.WriteLine(createMessage(str, source)); }
public static void Info(string str, LoggerSource source = LoggerSource.none) { Logger.checkFileLogger(); context.info(str, source); }
protected virtual string createMessage(string message, LoggerSource source = LoggerSource.none) { if (source != LoggerSource.none) { return String.Format("{0,-10} {1}", source.ToString(), message); } else { return String.Format("{0}", message); } }
private ConvertContext(bool isNone) { _isNone = isNone; Logger = new LoggerSource("blqw.Convert3", SourceLevels.Error); }
protected virtual void info(string str, LoggerSource source = LoggerSource.server) { logger.Info(createMessage(str, source)); }
protected virtual void error(string str, LoggerSource source = LoggerSource.server) { logger.Error(createMessage(str, source)); }
protected virtual void debug(string str, LoggerSource source = LoggerSource.server) { logger.Debug(createMessage(str, source)); }
protected virtual string createMessage(string message, LoggerSource source=LoggerSource.server) { return String.Format("{0,-20} {1}", source.ToString(), message); }
public static void Info(string str, LoggerSource source = LoggerSource.server) { context.info(str, source); }
public void SetUp() { AppDomain.CurrentDomain.SetData("APPBASE", ConfigurationManager.AppSettings["DefaultPhysicalAppPath"]); LoggerSource.SetTestableInstance(new TestLogSource()); }
public static void info(string str, LoggerSource source) { logger.Info(createMessage(str, source)); }
protected virtual void info(string str, LoggerSource source = LoggerSource.none) { try { logger.Info(createMessage(str, source)); } catch { } Console.WriteLine(createMessage(str, source)); }
public static void error(string str, LoggerSource source) { logger.Error(createMessage(str, source)); }
protected override string createMessage(string message, LoggerSource source = LoggerSource.server) { return DateTime.Now.ToString() + "_" + message; }
public static void debug(string str, LoggerSource source) { logger.Debug(createMessage(str, source)); }