microsoft / windows-container-tools

Collection of tools to improve the Windows Containers experience
MIT License
236 stars 66 forks source link

fix process monitor formatting #175

Closed CharityKathure closed 1 month ago

CharityKathure commented 1 month ago

Addressing issue: https://github.com/microsoft/windows-container-tools/issues/171

Issue Description:

Log Monitor allows users to specify the log format (Custom, JSON, or XML) for ETW, Event logs, and File logs through the respective sections in the config.json file.

However, in the case of process monitor logs, whose specifications are not captured in the config file, the logs should default to JSON unless the user specifies XML as the desired log format.

In the current implementation (in rc2.1.0), the default log format is XML unless JSON is specified. This is why when rc2.1.0 users specify "logFormat": "custom" the process monitor logs default to XML format.

For example: image

This change ensures that the default log format is JSON

profnandaa commented 1 month ago

As for the PR base, reason we're going for release/2.2 other than main?

CharityKathure commented 1 month ago

@profnandaa main has only the JSON formatting option (there is no log formatting option in config). release/2.2 branch has the JSON+ XML+ Custom logging work that is in the log monitor rc2.1.0.

This issue will only be noted in rc2.1.0.

profnandaa commented 1 month ago

@profnandaa main has only the JSON formatting option (there is no log formatting option in config). release/2.2 branch has the JSON+ XML+ Custom logging work that is in the log monitor rc2.1.0.

This issue will only be noted in rc2.1.0.

Got it. I think after the merge we can discuss switching the branches so that the code currently shipping can be in main and then the legacy v1 code can be in a v1 branch. /cc. @iankingori @tinamor