diff --git a/logging/Log.cs b/logging/Log.cs index 06b590c..d3663d7 100644 --- a/logging/Log.cs +++ b/logging/Log.cs @@ -553,6 +553,7 @@ static public class log var timeLine = new LogEvent( LogType.Raw, $"D A T E {time.Year}/{time.Month.ToString( "00" )}/{time.Day.ToString( "00" )} T I M E {time.Hour.ToString( "00" )}:{time.Minute.ToString( "00" )}:{time.Second.ToString( "00" )}.{time.Millisecond.ToString( "000" )}{time.Microsecond.ToString( "000" )}", "", 0, "", "lib.time", "", null ); + //writeToAll( endLine ); writeToAll( blankLine ); writeToAll( blankLine ); @@ -569,6 +570,10 @@ static public class log LogEvent msgFilename = new LogEvent( LogType.Info, $"Logging in {filename}", "", 0, "", "log.startup", "", null ); writeToAll( msgFilename ); + var optionsLine = new LogEvent( LogType.Info, $"Endpoints: {endpoints}", "", 0, "", "log.startup", "", null ); + writeToAll( optionsLine ); + + StartThread(); @@ -636,13 +641,19 @@ static public class log static void threadLoop() { - while( s_threading != ThreadState.Running ) + + Console.WriteLine( $"**********************************************************\n" ); + Console.WriteLine( $"Thread started" ); + + log.info( $"Thread started" ); + + while( s_threading != ThreadState.Running ) { // TODO PERF Replace this with a semaphore/mutex Thread.Sleep( 1 ); } - while( s_threading != ThreadState.Running ) + while( s_threading == ThreadState.Running ) { while( s_events.TryDequeue( out var evt ) ) { @@ -910,6 +921,8 @@ static public class log var finalEndpoints = s_logEPforCat.TryGetValue( evt.Cat, out var ep ) ? ep & s_endpoints : s_endpoints; + //Console.WriteLine( $"Final endpoints for {evt.Cat} = {finalEndpoints}" ); + if( ( finalEndpoints & Endpoints.File ) == Endpoints.File ) { var line = msgFile( evt );