mirror of
https://github.com/jie65535/GrasscutterCommandGenerator.git
synced 2025-10-22 20:09:46 +08:00
Add HTTP(S) proxy (#208)
This commit is contained in:
@@ -31,15 +31,26 @@ namespace GrasscutterTools.Utils
|
||||
|
||||
private static void Write(string message)
|
||||
{
|
||||
#if DEBUG
|
||||
Console.WriteLine($"{DateTime.Now:mm:ss.fff} {message}");
|
||||
#else
|
||||
if (IsSaveLogs)
|
||||
{
|
||||
Console.WriteLine($"{DateTime.Now:mm:ss.fff} {message}");
|
||||
File.AppendAllText(LogPath, $"{DateTime.Now:mm:ss.fff} {message}{Environment.NewLine}");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
private static void Write(string level, string tag, string message) => Write($"<{level}:{tag}> {message}");
|
||||
|
||||
//public static void Debug(string message) => Write("DEBUG", "Proxy", message);
|
||||
|
||||
//public static void Info(string info) => Write("INFO", "Proxy", info);
|
||||
|
||||
//public static void Error(Exception ex) => Write("ERROR", "Proxy", ex.ToString());
|
||||
|
||||
|
||||
public static void I(string tag, string info) => Write("INFO", tag, info);
|
||||
|
||||
public static void W(string tag, string message) => Write("WARR", tag, message);
|
||||
|
Reference in New Issue
Block a user