protected virtual void SendLog(LogDirection direction, String format, params Object[] parameters) { if (this.OnLog != null) { this.OnLog(this, new ClientLogArgs(direction, format, parameters)); } }
protected virtual void SendLog(LogDirection direction, String message) { if (this.OnLog != null) { this.OnLog(this, new ClientLogArgs(direction, message)); } }
public ClientLogArgs(LogDirection direction, String message) { this.Direction = direction; if (message.StartsWith("PASS")) { message = "PASS (hidden)"; } this.Text = message; }
public static void InsertServerCallLog(object message, string reference, LogDirection direction, System.Web.HttpContext context) { if (GlobalConfiguration.IsServerSideLogEnabled) { Log logEntity = new Log(); logEntity.ComputerName = Common.GetClientIp(context); logEntity.Date = DateTime.Now; logEntity.Message = message; logEntity.Reference = reference; logEntity.Url = HttpContext.Current.Request.UrlReferrer.ToString(); logEntity.Direction = direction; log.Debug(logEntity); } }
private void ReadLog(string content, StreamReader reader) { string[] excluded = { "A", "1", "0", "2", "4", "5" }; if ((content.IndexOf("UTC Message out", System.StringComparison.Ordinal) > 0) || content.Contains("CEST Message out (")) { LogLine line = new LogLine(content, LogDirection.Out, reader.ReadLine()); if ((line.FixMessage[35] != null) && (!excluded.Contains(line.FixMessage[35].Value)) ) { AddLine(line); } } // reading Topline ProRealTime or Retail Fix Service else if (Regex.IsMatch(content, "8\\=FIX.{50,1000}") && (!Regex.IsMatch(content, "\\[ACCEPTOR") || !Regex.IsMatch(content, @"\[Warn\]"))) { LogDirection dir = Regex.IsMatch(content, "\\;Out") || Regex.IsMatch(content, "toApp\\:") ? LogDirection.Out : LogDirection.In; Match match = Regex.Match(content, "8\\=FIX.{50,1000}"); // left out the incoming 'j' message if (match.Success) { LogLine line = new LogLine(content, dir, match.Value); if (!excluded.Contains(line.FixMessage.TagValue(35))) { AddLine(line); } } } else if ((content.IndexOf("UTC msg in (", System.StringComparison.Ordinal) > 0) || content.Contains("CEST msg in (")) { LogLine line = new LogLine(content, LogDirection.In, reader.ReadLine()); if ((line.FixMessage[35] != null) && (!excluded.Contains(line.FixMessage[35].Value)) ) { AddLine(line); } } }
/// <summary> /// Logs messages to a database. /// </summary> /// <param name="authenticatedTicket">The ticket which has the ticket string. The ticket could also be not authenticated if an error happened.</param> /// <param name="messageType">Type of message.</param> /// <param name="direction">Direction of the message (In the WebService, or Out the WebService).</param> /// <param name="arguments">Other arguments to save.</param> protected internal virtual void LogMessage(AuthenticatedTicket authenticatedTicket, LogMessageType messageType, LogDirection direction, string ticket, params string[] arguments) { }
/// <summary> /// Logs messages to a database. /// </summary> /// <param name="authenticatedTicket">The ticket which has the ticket string. The ticket could also be not authenticated if an error happened.</param> /// <param name="messageType">Type of message.</param> /// <param name="direction">Direction of the message (In the WebService, or Out the WebService).</param> /// <param name="ticket">The ticket.</param> /// <param name="arguments">Other arguments to save.</param> protected internal virtual void LogMessage(IAuthenticatedTicket authenticatedTicket, LogMessageType messageType, LogDirection direction, string ticket, params string[] arguments) { logger.LogTrace("Ticket: {TICKET}; Type: {TYPE}; Direction: {DIRECTION}; Arguments: {Arguments}", ticket, messageType, direction, arguments); }
/// <summary> /// Logs messages to a database. /// </summary> /// <param name="authenticatedTicket">The ticket which has the ticket string. The ticket could also be not authenticated if an error happened.</param> /// <param name="messageType">Type of message.</param> /// <param name="direction">Direction of the message (In the WebService, or Out the WebService).</param> /// <param name="arguments">Other arguments to save.</param> protected internal virtual Task LogMessageAsync(AuthenticatedTicket authenticatedTicket, LogMessageType messageType, LogDirection direction, string ticket, params string[] arguments) { return(Task.FromResult <object>(null)); }
public LogEventArgs(LogDirection direction, string message) { Direction = direction; Message = message; }
public LogLine(DateTime timestamp, LogDirection direction, string fixml) { this.fixml = fixml; this.direction = direction; this.datetime = timestamp; }
public LogLine(string logline, LogDirection direction, string fixml) { this.fixml = fixml; this.direction = direction; Parse(logline); }
public ClientLogArgs(LogDirection direction, String format, params Object[] parameters) : this(direction, String.Format(format, parameters)) { }