-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Allow to configuring the date format for console output in watchdog:s… #6253
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
base: 13.x
Are you sure you want to change the base?
Allow to configuring the date format for console output in watchdog:s… #6253
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed and tested locally - it works well with no issues, thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is incomplete. Dates shown as part of list will not be able to be custom formatted, for example. I'm not sure we really need this but I'll reserve judgement until a more complete PR arrives.
#[CLI\Option(name: 'severity-min', description: 'Restrict to messages of a given severity level and higher.')] | ||
#[CLI\Option(name: 'type', description: 'Restrict to messages of a given type.')] | ||
#[CLI\Option(name: 'extended', description: 'Return extended information about each message.')] | ||
#[CLI\Option(name: 'date_format', description: 'Specify a date format for the date console output.')] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We typically use dashes in option names not underscores.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
6bb4caa
to
a7fce11
Compare
…ist and watchdog:show-one commands
@weitzman Yes, it was incomplete. I've made the necessary changes to allow the configuration of a date format for the “watchdog:list” and “watchdog:show-one” commands. I'm not sure if this is really necessary, but it meets a user need at a lower cost. |
One alternative is to use cell rendering to format the date instead of doing it in the formatResult(). That way json/yaml/csv outputs would not do cennrendering and would get timestamps. Those are presumably easier to consume for scripts. I'm not sure if that would help with your client need. This approach breaks backward compat for scripts unfortunately. Lets think about this a bit more. Sorry for the delay. |
Provide a solution for issue Resolve #6252