This commit updates logging to handle nullable value types and parameters.
The following changes were made:
- Updated the Value record to use '!' instead of '?' for nullability.
- Added '!' to the default Value.
- Added '!= null' checks to conditional assignment.
- Removed unnecessary nullable-disable compiler directives.
x) In `Imm.cs`, renamed the delegate parameter from `ZZOld` to `old` for clarity.
x) Also in `Imm.cs`, changed the property name from `ZZOld` to `Old_backing`. This change was made across multiple classes within the file, improving code readability by using a more descriptive name.
x) In `Log.cs`, removed unused imports (`System.Security.Cryptography.X509Certificates`, `System.Dynamic`, `System.Xml.Schema`, and `Microsoft.CodeAnalysis.CSharp.Syntax`) to clean up the codebase.
x) Updated `Config.cs` to include a new instance of `XmlFormatter2Cfg` with specified data structure and POD.
x) Renamed the `destroy()` method in `Log.cs` to `shutdown()`.
x) Modified the startup process in `Log.cs` to check if it's already running, providing an info log if true.
x) Changed the encoding for StreamWriter in `startup()` method to UTF8 and added buffer size.
x) Commented out error stream related lines in Log.cs as they are not being used currently.
x) Added exception handling when processing message headers in log events.
x) Added checks for null or whitespace strings before writing them into files or console. Trimmed any null characters from lines before writing them into files.
x) Removed unnecessary white spaces and commented code blocks.
In this commit, several changes were made across different files:
- In `FSM.cs` and `Imm.cs`, the `[CallerArgumentExpression]` attribute was updated to reflect the correct argument names.
- The `ProcessWork` method in `Imm.cs` was changed from virtual to override.
- In `Log.cs`, the `[CallerArgumentExpression]` attribute was updated for clarity.
- A new override for the `GetHashCode()` method was added in `AddressStack.cs`.
- The version of "Microsoft.CodeAnalysis.CSharp" package reference was updated from 4.2.0 to 4.3.1 in 'SharpLib.csproj'.
These changes improve code readability and ensure that methods are correctly overridden where necessary. Also, updating the package version ensures compatibility with newer features or bug fixes provided by Microsoft's C# compiler platform.
In the logging/Log.cs file, the parameter of the Thread.Sleep function has been changed from 0 to 1. This change is likely aimed at adjusting the pause duration for a running thread. The context suggests this is a temporary solution until a semaphore or mutex can be implemented as indicated by the existing TODO comment.
x) Refactor logging endpoints to use more concise method names
x) Implement implicit conversion for Value struct
x) Add direct callback functionality to log events
x) Added enum for CommitResults
x) Created interface IID<TS>
x) Implemented DB class with lock, objects, committed lists
x) Updated lookup and checkout methods in DB class
x) Added TxStates enum and implemented Tx class with checkout, add, dispose methods
x) Implemented commit method in DB class to handle transactions efficiently
x) Add new logging events for GC and ThreadPoolWorkerThread
x) Implement method to extract method information from TraceEvent
x) Enhance log details display for specific event types
x) Improve time header format in log messages
x) Refactor verbose logging messages to include type friendly names
x) Added new event handling for runtime garbage collection events
x) Implemented logging endpoints for different categories
x) Improved object creation handling based on type constructors
x) Implement PrintRuntimeGCEvents method to monitor GC events in a specified process
x) Refactor logs for structured logging using interpolated strings
x) Introduce TraceLogMonitor class for real-time monitoring of exceptions and module loads
- Refactor various logs to enable automagic structured logging
- Add `Value` struct for creating values with debug expressions
- Update `LogEvent` constructor to include an expression field
- Modify log methods to pass debug expressions for messages
- Implement new methods for logging values and objects with debug expressions
- Updated Log.cs to handle nullable object types
- Modified LogEvent class to accept nullable object types
- Adjusted methods in log class to use nullable object types where necessary
- Initialized s_thread variable with Thread.CurrentThread
- Updated MemorySourceText and MemoryRefResolver classes in Script.cs
- Implemented overrides for SourceText properties and methods in MemorySourceText class
- Refactored MemoryRefResolver class to handle nullability correctly
x) Add whatFile for fast cached lookup of filenames from a path
x) Debug renames
x) Add default OnChanged handler that does nothing
x) Cleanups to the FSM stuff