internal override void Write(Logger.LogMessage msg)
 {
     lock (this.syncroot)
     {
         base.Write(msg);
     }
     this.waitevent.Set();
 }
Example #2
0
 internal virtual void Write(Logger.LogMessage message)
 {
     if (this.processImediately)
     {
         this.ProcessMessage(message);
         return;
     }
     this.MessageQueue.Enqueue(message);
 }
        protected override void ProcessMessage(Logger.LogMessage message)
        {
            NativeDebugCallback nativeDebugCallback = this.callback;

            if (nativeDebugCallback == null)
            {
                return;
            }
            nativeDebugCallback(message.LogfileMessage);
        }
Example #4
0
        protected Logger.LogMessage CreateLogMessage(LogType type, string format, object[] args)
        {
            Logger.LogMessage logMessage = new Logger.LogMessage()
            {
                Type = type
            };
            DateTime now = DateTime.Now;

            logMessage.ConsoleMessage = string.Format("[Oxide] {0} [{1}] {2}", now.ToShortTimeString(), type, format);
            now = DateTime.Now;
            logMessage.LogfileMessage = string.Format("{0} [{1}] {2}", now.ToShortTimeString(), type, format);
            Logger.LogMessage logMessage1 = logMessage;
            if (Interface.Oxide.Config.Console.MinimalistMode)
            {
                logMessage1.ConsoleMessage = format;
            }
            if (args.Length != 0)
            {
                logMessage1.ConsoleMessage = string.Format(logMessage1.ConsoleMessage, args);
                logMessage1.LogfileMessage = string.Format(logMessage1.LogfileMessage, args);
            }
            return(logMessage1);
        }
Example #5
0
 protected virtual void ProcessMessage(Logger.LogMessage message)
 {
 }
Example #6
0
 /// <summary>
 /// Processes the specified message
 /// </summary>
 /// <param name="message"></param>
 protected override void ProcessMessage(Logger.LogMessage message)
 {
     // Write to the file
     writer.WriteLine(message.Message);
 }
 protected override void ProcessMessage(Logger.LogMessage message)
 {
     this.writer.WriteLine(message.LogfileMessage);
 }