Commit Graph

6 Commits

Author SHA1 Message Date
a35e101f23 Refactor log file naming and improve Format method
Changed log file naming to use <Namespace>.<random-6>.<PID>.log instead of including 'pid' in the filename. Moved file stream creation inside the Trace listener check. Reformatted and clarified the Format method for better readability and error handling.
2025-09-28 20:14:00 +09:00
ce84aab861 Improve TraceLogger with file-based logging and fallback
TraceLogger now writes logs to a file in %APPDATA%\WelsonJS\Logs with a randomized suffix and process ID. If the log directory cannot be created, it falls back to the current directory. The logger also improves formatting and random suffix generation for log file names.
2025-09-28 19:59:45 +09:00
87020d35ac Refactor logger interface and add JsNative interop layer
Updated ICompatibleLogger to accept params object[] for flexible logging. Refactored TraceLogger to support the new interface and improved formatting. Added JsNative.cs to encapsulate ChakraCore P/Invoke interop, and updated JsCore to use JsNative for all native calls. Modified all resource tools to accept and use ICompatibleLogger for consistent logging. Updated project file to include new and updated sources.
2025-09-28 00:07:41 +09:00
6896c272ef
Update WelsonJS.Toolkit/WelsonJS.Launcher/TraceLogger.cs
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-08-17 20:58:08 +09:00
cc08c46886 Improve logging and async handling in ResourceServer
ResourceServer now defaults to using TraceLogger if no logger is provided and properly awaits FetchBlobConfig. FetchBlobConfig is refactored to return a Task and handle missing configuration more gracefully. TraceLogger now writes logs to a file named after its namespace and sets up a TextWriterTraceListener for persistent logging.
2025-08-17 20:12:38 +09:00
8ecdf99d78 Add ICompatibleLogger interface and integrate logging
Introduced ICompatibleLogger interface and TraceLogger implementation to enable flexible logging. ResourceServer now uses ICompatibleLogger for error reporting instead of Trace, improving testability and future extensibility. Updated project file to include new logger classes.
2025-08-16 21:23:16 +09:00