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

Update default log formats to escape messages using JSON encoding rules #116

Merged
merged 27 commits into from
May 20, 2024

Conversation

nnshah1
Copy link
Contributor

@nnshah1 nnshah1 commented May 14, 2024

  • Added support for escaping log messages by default
  • Added environment variable to disable escaping
  • refactored windows support to simplify deltas
  • added macros for logging Protobuf, and Table objects w/o escaping

Related PRs

Log Examples

Original Log Examples

Original Log

log_file_orig.log

Log File All Strings Escaped

Log File All Strings Escaped

log_file_escaped.log

escaped_table
escaped_json
escaped_protobuf

Log File with Special Handling for Protobuf, table, and ServerMessage objects

Log File with Special Handling for Protobuf, table, and ServerMessage objects

log_file_escaped_special_handling.log
special_handling_tables
special_handling_json
special_handling_protobuf

src/logging.cc Outdated Show resolved Hide resolved
@nnshah1 nnshah1 requested a review from rmccorm4 May 17, 2024 01:10
include/triton/common/logging.h Show resolved Hide resolved
include/triton/common/logging.h Show resolved Hide resolved
include/triton/common/triton_json.h Outdated Show resolved Hide resolved
src/logging.cc Outdated Show resolved Hide resolved
include/triton/common/logging.h Outdated Show resolved Hide resolved
include/triton/common/logging.h Show resolved Hide resolved
include/triton/common/logging.h Outdated Show resolved Hide resolved
src/logging.cc Show resolved Hide resolved
@nnshah1 nnshah1 requested a review from yinggeh May 20, 2024 21:02
Copy link
Contributor

@rmccorm4 rmccorm4 left a comment

Choose a reason for hiding this comment

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

Deferring refactors/suggestions such as type-safe logging functions and moving header implementations into .cc files to follow-up PR due to time constraints

@nnshah1 nnshah1 merged commit c4f730f into main May 20, 2024
1 check passed
mc-nv pushed a commit that referenced this pull request May 21, 2024
* adding explicit include of array

* Update default log formats to escape messages using JSON encoding rules
CGranger-sorenson added a commit to CGranger-sorenson/common that referenced this pull request May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants