55
66namespace GodotModules
77{
8- public static class Logger
8+ public class Logger
99 {
10- private static ConcurrentQueue < ThreadCmd < LoggerOpcode > > Messages = new ConcurrentQueue < ThreadCmd < LoggerOpcode > > ( ) ;
10+ private ConcurrentQueue < ThreadCmd < LoggerOpcode > > Messages = new ConcurrentQueue < ThreadCmd < LoggerOpcode > > ( ) ;
1111
12- public static void LogErr ( Exception ex , string hint = "" )
12+ public void LogErr ( Exception ex , string hint = "" )
1313 {
1414 Messages . Enqueue ( new ThreadCmd < LoggerOpcode > ( LoggerOpcode . LogError , new GodotError
1515 {
1616 Exception = ex ,
1717 Hint = hint
1818 } ) ) ;
1919 }
20- public static void LogTODO ( object v , ConsoleColor color = ConsoleColor . White ) => Log ( $ "[TODO]: { v } ", color ) ;
21- public static void LogWarning ( object v , ConsoleColor color = ConsoleColor . Yellow ) => Log ( $ "[Warning]: { v } ", color ) ;
22- public static void LogDebug ( object v , ConsoleColor color = ConsoleColor . Magenta , bool trace = true , [ CallerFilePath ] string filePath = "" , [ CallerLineNumber ] int lineNumber = 0 )
20+ public void LogTODO ( object v , ConsoleColor color = ConsoleColor . White ) => Log ( $ "[TODO]: { v } ", color ) ;
21+ public void LogWarning ( object v , ConsoleColor color = ConsoleColor . Yellow ) => Log ( $ "[Warning]: { v } ", color ) ;
22+ public void LogDebug ( object v , ConsoleColor color = ConsoleColor . Magenta , bool trace = true , [ CallerFilePath ] string filePath = "" , [ CallerLineNumber ] int lineNumber = 0 )
2323 {
2424 var path = "" ;
2525 if ( trace )
@@ -32,7 +32,7 @@ public static void LogDebug(object v, ConsoleColor color = ConsoleColor.Magenta,
3232 Color = color
3333 } ) ) ;
3434 }
35- public static void Log ( object v , ConsoleColor color = ConsoleColor . Gray )
35+ public void Log ( object v , ConsoleColor color = ConsoleColor . Gray )
3636 {
3737 Messages . Enqueue ( new ThreadCmd < LoggerOpcode > ( LoggerOpcode . LogMessage , new GodotMessage
3838 {
@@ -41,7 +41,7 @@ public static void Log(object v, ConsoleColor color = ConsoleColor.Gray)
4141 } ) ) ;
4242 }
4343
44- public static void LogMs ( Action code )
44+ public void LogMs ( Action code )
4545 {
4646 var watch = new Stopwatch ( ) ;
4747 watch . Start ( ) ;
@@ -50,7 +50,7 @@ public static void LogMs(Action code)
5050 Log ( $ "Took { watch . ElapsedMilliseconds } ms") ;
5151 }
5252
53- public static void Dequeue ( )
53+ public void Dequeue ( )
5454 {
5555 if ( Messages . TryDequeue ( out ThreadCmd < LoggerOpcode > cmd ) )
5656 {
0 commit comments