/ src / modules / imageresizer / ui / Cli / CliLogger.cs
CliLogger.cs
 1  // Copyright (c) Microsoft Corporation
 2  // The Microsoft Corporation licenses this file to you under the MIT license.
 3  // See the LICENSE file in the project root for more information.
 4  
 5  using ManagedCommon;
 6  
 7  namespace ImageResizer.Cli
 8  {
 9      public static class CliLogger
10      {
11          private static bool _initialized;
12  
13          public static void Initialize(string logSubFolder)
14          {
15              if (!_initialized)
16              {
17                  Logger.InitializeLogger(logSubFolder);
18                  _initialized = true;
19              }
20          }
21  
22          public static void Info(string message) => Logger.LogInfo(message);
23  
24          public static void Warn(string message) => Logger.LogWarning(message);
25  
26          public static void Error(string message) => Logger.LogError(message);
27      }
28  }