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

Harmonize date format #203

Merged
merged 3 commits into from
Sep 22, 2020
Merged

Harmonize date format #203

merged 3 commits into from
Sep 22, 2020

Conversation

GregoireGonzalez
Copy link
Contributor

@GregoireGonzalez GregoireGonzalez commented Sep 17, 2020

✨ Pull Request Template

‼️ Once all the checklist is done you have to:

  • stash merge this pull request
  • delete the corresponding branch
  • close the associated issue

📃 Type of change

Bug fix: non-breaking change which fixes an issue.

💡 Related Issue(s)

✒️ Description

We used to have several different date formats, which are now harmonized in UTC / RFC 3339.

🎯 Test Environments

HBSD 12.1

  • Redis 5.0.9
  • Boost 1.72
  • clang++ 10.0.0
  • CMake 3.17.3
  • Python 3.7

Ubuntu 20.04

  • Redis 5.0.9
  • Boost 1.72
  • GCC 9.3.0
  • CMake 3.16.3
  • Python 3.8

✔️ Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (no changes needed)
  • New and existing unit tests pass locally with my changes

  • 🙋 I certify on my honor that all the information provided is true, and I've done all I can to deliver a high quality code

Grégoire Gonzalez de Linares added 2 commits September 17, 2020 13:49
From now on, all date formats il logs and alerts should be the same
(UTC timezone with RFC 3339)

Changes were applied in:
manager.py for manager's logs
Logger.cpp for filters' logs

No needs to change for:
alerting
Just removed useless statements due to modifications
as well as comments and debug prints.
@GregoireGonzalez GregoireGonzalez self-assigned this Sep 17, 2020
@GregoireGonzalez GregoireGonzalez marked this pull request as ready for review September 17, 2020 12:34
HugoSoszynski
HugoSoszynski previously approved these changes Sep 17, 2020
Comment on lines 86 to 89
date = datetime.utcnow().isoformat('T').split('.')[0] + 'Z'

formatter = logging.Formatter(
'{"date":"%(asctime)s","level":"%(levelname)s","message":"%(message)s"}')
'{"date":"' + date + '","level":"%(levelname)s","message":"%(message)s"}')
Copy link
Member

Choose a reason for hiding this comment

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

date will always be the same, can't do it this way

@frikilax frikilax added this to the 1.4.0 milestone Sep 21, 2020
@frikilax frikilax linked an issue Sep 21, 2020 that may be closed by this pull request
@frikilax frikilax added the enhancement New feature or request label Sep 21, 2020
Applied a converter to log in UTC.
Applied the following date format: %Y-%m-%dT%H:%M:%SZ
@HugoSoszynski HugoSoszynski merged commit a844a1a into dev Sep 22, 2020
@HugoSoszynski HugoSoszynski deleted the harmonize_date_format branch September 22, 2020 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] format of filter logs' date is not RFC3339
3 participants