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

struct logs with gz rotation #18

Merged
merged 7 commits into from
Mar 16, 2022
Merged

struct logs with gz rotation #18

merged 7 commits into from
Mar 16, 2022

Conversation

yash-puligundla
Copy link
Member

Adds Struct logs with .gz file rotation

  • Add logs in json format with fields - utc_timestamp, message, logger, level, class_name, method_name, file_name, line_number
  • A log file name should end with ".log" (example: "ga4gh-testbed-infrastructure.log"). If a log file name is provided in the config, then the JSON logs will be written to a log file, which will be .gz rotated every day at UTC. For now, we are saving a 30-day history of logfiles.
  • If a log file name is not provided, it defaults to console logging, which is also in JSON format and has the same fields as mentioned above.
  • removed the methods trace, warn, debug, etc from TestbedLoggingUtil class so that the true caller line number, method, class, and filename are captured in the logs.

@jb-adams Please let me know if you have any questions.

Copy link
Member

@jb-adams jb-adams left a comment

Choose a reason for hiding this comment

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

Looks great @yash-puligundla ! Feel free to merge and rebase the other one

@jb-adams jb-adams merged commit cc41f0b into develop Mar 16, 2022
@jb-adams jb-adams deleted the yp_struct_logs branch March 16, 2022 16:12
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.

Logs part 1 - Add logs in json format and zip rotate the log file periodically
2 participants