Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix process monitor formatting #175

Merged
merged 2 commits into from
May 27, 2024
Merged

Conversation

CharityKathure
Copy link
Contributor

@CharityKathure CharityKathure commented May 26, 2024

Addressing issue: #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

@CharityKathure CharityKathure linked an issue May 26, 2024 that may be closed by this pull request
@CharityKathure CharityKathure marked this pull request as ready for review May 27, 2024 09:00
@profnandaa
Copy link
Member

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

@CharityKathure
Copy link
Contributor Author

@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.

@CharityKathure CharityKathure merged commit c57eb14 into release/2.2 May 27, 2024
4 checks passed
@profnandaa
Copy link
Member

@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

@profnandaa profnandaa deleted the processMonitorFormatting branch May 27, 2024 15:36
CharityKathure added a commit that referenced this pull request Jul 24, 2024
* feat: adding support for legacy XML log output (#119)

* Custom Log Format  (#124)

* Make JSON the default log format

---------

Co-authored-by: Charity Kathure <ckathure@microsoft.com>

* Custom JSON Log Sanitization (#128)

---------

Co-authored-by: Charity Kathure <ckathure@microsoft.com>

* Formatting for scalar integer property values using TdhFormatProperty (#129)

---------

Co-authored-by: Bob Sira <bosira@microsoft.com>

* docs: configurable / custom log format (#136)

---------

Co-authored-by: Charity Kathure <ckathure@microsoft.com>

* fix process monitor formatting (#175)

---------

Co-authored-by: Charity Kathure <ckathure@microsoft.com>

* Process Monitor Custom Logging (#176)

Signed-off-by: Charity Kathure <ckathure@microsoft.com>

---------

Signed-off-by: Charity Kathure <ckathure@microsoft.com>
Co-authored-by: Charity Kathure <ckathure@microsoft.com>

* Resolve build error and lint issues, and add process monitor details into the docs

Signed-off-by: Charity Kathure <ckathure@microsoft.com>

---------

Signed-off-by: Charity Kathure <ckathure@microsoft.com>
Co-authored-by: Charity Kathure <ckathure@microsoft.com>
Co-authored-by: Bob Sira <sbobfitz2@gmail.com>
Co-authored-by: Bob Sira <bosira@microsoft.com>
Co-authored-by: Ian King'ori <kingorim.ian@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Process monitor adds XML when format is custom
4 participants