Ejemplo n.º 1
0
 // solves the problem that when we disconnect the socket of our own free will, then it is not necessary to log related errors
 private void _logSocketMessage(ZLogLevel level, string message)
 {
     if (!_socketCloseInitiated)
     {
         _logger.Log(level, message);
     }
 }
        private void Write(string message, LogType type)
        {
            logMessage.Add(new LOG()
            {
                message = message,
                type    = type
            });

            if (logMessage.Count == MAXLOG)
            {
                RemoveFirstLogEntry();
            }

            ZLogger.Log(message, type);
        }
        private void Write(string message, LogType type, params object[] arg)
        {
            logMessage.Add(new LOG()
            {
                message = string.Format(message, arg),
                type    = type
            });

            if (logMessage.Count == MAXLOG)
            {
                RemoveFirstLogEntry();
            }

            ZLogger.Log(message, type, arg);
        }