-
Notifications
You must be signed in to change notification settings - Fork 59
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(output): complete rework of the output system #335
update(output): complete rework of the output system #335
Conversation
8d051f3
to
248e093
Compare
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.
Huge job, thank you very much! Left some minor comments, but this LGTM!
Old flags "--verbose" and "--disable-styling" have been deprecated. Two new flags configure the output system: * --log-level can be one of info, warn debug or trace. * --log-format can be one of color, text, json. The output is done using a logger that is used across all commands. Having a unique logger guarantees a consistent format of the output. Signed-off-by: Aldo Lacuku <[email protected]>
248e093
to
054f187
Compare
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.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alacuku, FedeDP The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
LGTM label has been added. Git tree hash: bb9a9c692640a32db52a63023d9218a68a452837
|
What type of PR is this?
/kind feature
Any specific area of the project related to this PR?
/area cli
/area tests
What this PR does / why we need it:
It's a complete rework of the output system. The scope is to introduce a consistent
logging
andformatting
across all falcoctl commands. It is done by usingstructured logging
, but at the same time objects asspinners
andprogress bars
are rendered during the operations but removed once done. Furthermore the new logging prints also thetimestamps
which is handy for thefaloctl artifact follow
command. It allows to know when a specific actions has been performed and easies the troubleshooting problems when they occurs.The old flags
--verbose
and--disable-styling
have been deprecated and substituted with--log-level
and--log-format
flags. It will be completely removed in one of the next releases of falcoctl.The new log levels supported in falcoctl are:
The default value is
Info
.The new formats are
color, text and json
.By setting the
--verbose
flag is equivalent to using--log-level debug
and the--disable-styling
is equivalent to--log-format json
Here are some examples of the new output in falcoctl:
Default logging:
Same as above but in
json format
:Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer: