Example #1
0
 public void Debug(string format)
 {
     DebugEntries.Add(new LogEntry
     {
         Format = format,
     });
 }
Example #2
0
 public void Debug(string format, params object[] args)
 {
     DebugEntries.Add(new LogEntry
     {
         Format = format,
         Params = args,
     });
 }
Example #3
0
 public void Debug(Exception exception, string format, params object[] args)
 {
     DebugEntries.Add(new LogEntry
     {
         Format    = format,
         Params    = args,
         Exception = exception
     });
 }
Example #4
0
        /// <summary>
        /// Logs the Entry to the Report and DebugReport... As well as Prints the Message .. All Without Indentation
        /// </summary>
        /// <param name="message"> </param>
        public void WriteLine(string message = "")
        {
            message = message.Trim();
            if (Verbose)
            {
                Console.WriteLine(message);
            }

            DebugEntries.Add(message);
            Entries.Add(message);
        }
Example #5
0
        /// <summary>
        /// Adds the Entry to the DebugReport, Prints the Message.
        /// </summary>
        /// <param name="message"> </param>
        /// <param name="increaseIndentation"> </param>
        public void Debug(string message, bool increaseIndentation = false)
        {
            if (increaseIndentation)
            {
                _indent += '\t';
            }

            DebugEntries.Add(_indent + message);

            if (Verbose)
            {
                System.Diagnostics.Debug.WriteLine(_indent + message);
            }

            if (increaseIndentation)
            {
                _indent = _indent.TrimEnd('\t');
            }
        }
Example #6
0
        /// <summary>
        /// Logs the Entry to the Report and DebugReport... As well as Prints the Message
        /// </summary>
        /// <param name="message"> </param>
        /// <param name="increaseIndentation"> </param>
        public void Log(string message = "", bool increaseIndentation = false)
        {
            if (increaseIndentation)
            {
                _indent += '\t';
            }

            if (Verbose)
            {
                Console.WriteLine(_indent + message);
            }

            DebugEntries.Add(_indent + message);
            Entries.Add(_indent + message);

            if (increaseIndentation)
            {
                _indent = _indent.TrimEnd('\t');
            }
        }
Example #7
0
 public async void Init()
 {
     DebugEntries.AddRange(GetIpAddressesOutput());
     DebugEntries.AddRange(await GetGeolocOutput());
 }
Example #8
0
 public void Debug(string message) => DebugEntries.Add(message);