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

allow more time formats to prettylog command #699

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

shvydky
Copy link

@shvydky shvydky commented Dec 8, 2024

Thank You!

First, I want to express my gratitude to the authors of the zerolog library—it’s an amazing tool that I truly appreciate!

Summary

This PR extends the functionality of the prettylog command by enabling the use of a wider range of supported time formats. The current limitation to Kitchen and RFC1123 formats can be restrictive in certain scenarios, as I’ve experienced.

Proposed Changes

  1. Add Support for More Predefined Formats
    Include the following additional time formats:
    • ANSIC
    • DateTime
    • RFC1123
    • RFC1123Z
    • RFC3339
    • RFC3339Nano
    • RFC822
    • RFC822Z
    • RFC850
    • Stamp
    • StampMilli
    • TimeOnly
    • Unix
  2. Enable Custom Time Formats
    Allow users to specify their own custom Go time format strings, offering maximum flexibility.
  3. Maintain Backward Compatibility
    Retain the existing default and full formats to ensure seamless upgrades for current users.

This update expands the functionality of prettylog while respecting the existing defaults, ensuring a smooth transition for current users. I believe this enhancement will benefit a wide range of use cases and make the tool even more versatile.

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.

1 participant