refactor: replace GoDotLog with Chickensoft.Log #130
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Updates GoDotTest to use the new Chickensoft.Log package instead of GoDotLog.
PackageReference
GoDotLog -> Chickensoft.Logusing
statements GoDotLog -> Chickensoft.LogGDLog(name)
withLog(name, new TraceWriter())
to support output in VSCode, VS, and GodotAdd logic toGoTest.RunTests()
to optionally add aDefaultTraceListener
toTrace.Listeners
, to enable echoing output to Visual Studio's Output pane. This logic also removes theDefaultTraceListener
in afinally
block, in case multiple calls toGoTest.RunTests()
take place (as in the test suite for this package). The option to addDefaultTraceListener
isenableddisabled by default.TraceListenerManager
class implementingIDisposable
that optionally adds aDefaultTraceListener
to the global trace-listeners collection in its constructor, and removes the listener when disposed. Add aTraceListenerManager
in ausing
toGoTest.RunTests()
to optionally add aDefaultTraceListener
before running tests and remove it after.preventsenables theDefaultTraceListener
. VSCode gets doubled output ifDefaultTraceListener
is added, presumably from listening to bothTrace
and to Godot's console output of the sameTrace
, so this option should beenabledskipped in VSCode settings to avoid the doubled output. (Godot outputsTrace
to console by registering its own listener and then echoing that data to console.)DefaultTraceListener
and thereby provide output when debugging in Visual Studio.WIth these changes, GoDotTest output appears in Godot, Visual Studio, and VSCode:


