alielie
2025-07-04 0940f31b7eba1cf6b6a8c1fca72d97cf686e79f2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
using HMI.Core.Api;
 
namespace HMI.Core.Util
{
    public class LoggerHelper
    {
        public static ILogWriter Logger { get; private set; }
 
        public static void Register(ILogWriter logger)
        {
            if (Logger == null)
            {
                Logger = logger;
            }
        }
 
        public static void Debug(string source, string content)
        {
            Logger?.Debug(source, content);
        }
 
        public static void Info(string source, string content)
        {
            Logger?.Info(source, content);
        }
 
        public static void Warn(string source, string content)
        {
            Logger?.Warn(source, content);
        }
 
        public static void Error(string source, string content)
        {
            Logger?.Error(source, content);
        }
    }
}