Example #1
0
        void LogMessage(Options.LogLevel level, string Log)
        {
            if (options != null)
            {
                switch (level)
                {
                case Options.LogLevel.Error:
                    options.LogError(Log);
                    break;

                case Options.LogLevel.Information:
                    options.LogInformation(Log);
                    break;

                case Options.LogLevel.Verbose:
                    options.LogVerbose(Log);
                    break;

                case Options.LogLevel.Warning:
                    options.LogWarning(Log);
                    break;

                default:
                    break;
                }
            }
            System.Diagnostics.Debug.WriteLine(Log);
        }
Example #2
0
 public static void Print(string message, Options.LogLevel logLevel)
 {
     if ((int)logLevel >= (int)ApplicationState.Options.Log)
     {
         Console.WriteLine(message);
     }
 }