DTLib/PublicLog.cs

16 lines
567 B
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

namespace DTLib;
//
// вывод логов со всех классов в библиотеке
//
public static class PublicLog
{
public delegate void LogDelegate(params string[] msg);
// вот к этому объекту подключайте методы для вывода логов
public static event LogDelegate LogEvent;
public static void Log(params string[] msg) => LogEvent?.Invoke(msg);
public static event LogDelegate LogNoTimeEvent;
public static void LogNoTime(params string[] msg) => LogNoTimeEvent?.Invoke(msg);
}