BF2Statistics.Logging.LogWriter.Write C# (CSharp) Method

Write() public method

Adds a message to the queue, to be written to the log file
public Write ( string message ) : void
message string The message to write to the log
return void
        public void Write(string message)
        {
            // Dont write if we arent enabled
            if (!LoggingEnabled) return;

            // Push to the Queue
            LogQueue.Enqueue(new LogMessage(message));
        }

Usage Example

        /// <summary>
        /// Creates a new instance of CDKeyServer
        /// </summary>
        /// <param name="DebugLog">The GamespyDebug.log logwriter object</param>
        public CDKeyServer(LogWriter DebugLog)
            : base(29910, 4)
        {
            // Debugging
            this.DebugLog = DebugLog;
            DebugLog.Write("Bound to UDP port: " + Port);

            // Start accepting remote connections
            base.StartAcceptAsync();
        }
All Usage Examples Of BF2Statistics.Logging.LogWriter::Write