Skip to content

Conversation

@CharityKathure
Copy link
Contributor

@CharityKathure CharityKathure commented Feb 20, 2025

This pull request introduces significant changes to the LogMonitor project, primarily focusing on replacing the ConfigFileParser and JsonFileParser with a new JsonProcessor module. This includes the addition of new functions for handling different log types and updating the project files accordingly.

New JsonProcessor module:

  • Added JsonProcessor.cpp with functions to load, parse, and process JSON configuration files, handling different log types such as EventLog, File, ETW, and Process logs.
  • Added JsonProcessor.h with declarations for the new functions in JsonProcessor.cpp.

Project file updates:

  • Updated LogMonitor.vcxproj to include JsonProcessor.cpp and JsonProcessor.h, and removed references to ConfigFileParser.cpp and JsonFileParser.cpp. [1] [2]
  • Updated LogMonitorTests.vcxproj to include JsonProcessorTests.cpp and removed references to ConfigFileParserTests.cpp. [1] [2]

Test updates:

  • Added a new test class JsonProcessorTests in JsonProcessorTests.cpp to test the new JsonProcessor functionalities.
  • Updated LogMonitorTests.cpp to remove the inclusion of ConfigFileParser.cpp.

Pipeline changes:

  • pipeline changes to address boost dependencies that were causing build failures

Codebase simplification:

  • Modified Main.cpp to use loadAndProcessJson instead of OpenConfigFile for reading the configuration file.

These changes aim to enhance the functionality and maintainability of the LogMonitor project by introducing a more robust JSON processing module.

@CharityKathure CharityKathure changed the title Json boost parsing Refactor JSON Parsing to Use Boost.JSON Feb 20, 2025
@CharityKathure CharityKathure marked this pull request as ready for review February 20, 2025 00:29
Copy link

@billywr billywr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@bobsira
Copy link
Contributor

bobsira commented Mar 17, 2025

A bit late to the BootJSON migration party, firstly can you point me to any docs we have if any to support the move to use BoostJSON? How efficient is BoostJSON, does it impact Log Monitor in any way, i.e making a bit bulky? Secondly can you provide some sample JSON configuration I can use to test this on my end as I look at the code? I'm assuming the config file does not change much

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

#include "pch.h"

#include "../src/LogMonitor/ConfigFileParser.cpp"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we not need this anymore?

Copy link
Contributor Author

@CharityKathure CharityKathure Apr 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need it anymore since we are using the new file JsonProcessor.cpp

Comment on lines -24 to -26
<ClCompile Include="ConfigFileParserTests.cpp">
<Filter>Source Files</Filter>
</ClCompile>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question, why are we getting rid of this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In favour of JsonProcessorTests.cpp

Charity Kathure added 2 commits April 14, 2025 23:41
Signed-off-by: Charity Kathure <ckathure@microsoft.com>
Signed-off-by: Charity Kathure <ckathure@microsoft.com>
Copy link
Contributor

@TinaMor TinaMor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@CharityKathure CharityKathure merged commit 2cb8e5d into version2.2.0-rc Apr 15, 2025
2 checks passed
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.

5 participants