Ejemplo n.º 1
0
 private static void WriteLine(TcpExchangeHub hub, TcpRelayDirection direction, string information)
 {
     Console.WriteLine("{0:HH:mm:ss.ff} {1} {2} {3}",
                       DateTime.Now,
                       TcpDataLoggerHelper.GetDirectionShortCode(direction),
                       TcpDataLoggerHelper.GetShortInstanceName(hub),
                       information);
 }
Ejemplo n.º 2
0
        private void WriteLine(TcpExchangeHub hub, TcpRelayDirection direction, string message)
        {
            this.EnsureIsInitialized();

            DateTime dt = DateTime.Now;

            lock (this._lockObject)
            {
                this._fileWriter.WriteLine("{0:yyyy-MM-dd HH:mm:ss.fff} {1} {2}+ {3}",
                                           dt,
                                           TcpDataLoggerHelper.GetShortInstanceName(hub),
                                           TcpDataLoggerHelper.GetDirectionShortCode(direction),
                                           message
                                           );
            }
        }