[console] Add new commands for Console Logging feature in CONSOLE_PORT - #4685
nats-nokia wants to merge 3 commits into
Conversation
|
/azp run |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
|
Hi, there are workflow run(s) waiting for approval, you may be first-time contributor. I will notify maintainers to help approve once PR is approved. Thanks! ---Powered by SONiC BuildBot
|
| @click.argument('logrotate_keyword', metavar='logrotate', required=False) | ||
| @click.argument('size', metavar='<size>', required=False) | ||
| @click.argument('count', metavar='<count>', required=False, type=click.IntRange(1, 100)) | ||
| def set_console_logging_filename(db, filename, logrotate_keyword, size, count): |
There was a problem hiding this comment.
Would it be possible to use click options for logrotate parameters instead of positional arguments?
Since logrotate has multiple optional fields, options may provide better extensibility and avoid ambiguous CLI parsing.
318fb4b to
64b7ab2
Compare
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
64b7ab2 to
125b89f
Compare
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Signed-off-by: Natarajan Subbiramani <natarajan.subbiramani@nokia.com>
modified logrotate default values size as 10M, count as 10 logrotate parameters as click options Signed-off-by: Natarajan Subbiramani <natarajan.subbiramani@nokia.com>
Signed-off-by: Natarajan Subbiramani <natarajan.subbiramani@nokia.com>
125b89f to
c494684
Compare
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
|
Hi @sonic-net/sonic-utilities-maintainer, this approved PR has workflow run(s) waiting for approval. Please help review. Thanks! ---Powered by SONiC BuildBot
|
7 similar comments
|
Hi @sonic-net/sonic-utilities-maintainer, this approved PR has workflow run(s) waiting for approval. Please help review. Thanks! ---Powered by SONiC BuildBot
|
|
Hi @sonic-net/sonic-utilities-maintainer, this approved PR has workflow run(s) waiting for approval. Please help review. Thanks! ---Powered by SONiC BuildBot
|
|
Hi @sonic-net/sonic-utilities-maintainer, this approved PR has workflow run(s) waiting for approval. Please help review. Thanks! ---Powered by SONiC BuildBot
|
|
Hi @sonic-net/sonic-utilities-maintainer, this approved PR has workflow run(s) waiting for approval. Please help review. Thanks! ---Powered by SONiC BuildBot
|
|
Hi @sonic-net/sonic-utilities-maintainer, this approved PR has workflow run(s) waiting for approval. Please help review. Thanks! ---Powered by SONiC BuildBot
|
|
Hi @sonic-net/sonic-utilities-maintainer, this approved PR has workflow run(s) waiting for approval. Please help review. Thanks! ---Powered by SONiC BuildBot
|
|
Hi @sonic-net/sonic-utilities-maintainer, this approved PR has workflow run(s) waiting for approval. Please help review. Thanks! ---Powered by SONiC BuildBot
|
|
Hi @sonic-net/sonic-utilities-maintainer, this approved PR has workflow run(s) waiting for approval. Please help review. Thanks! ---Powered by SONiC BuildBot
|
What I did
Add new commands to enable, disable console logging. optional command to modify the filename, logrotate parameters for the filename.
Related PR from other sub modules:
sonic-net/sonic-buildimage#28411
sonic-net/sonic-host-services#409
How I did it
Add new commands: config console logging {enable/disable}.
optional command: config console logging filename [--logrotate-size SIZE] [--logrotate-count COUNT]
If filename,logrorate parameters are not configured, default values (/var/log/console-.log, 10M size, 10 count) will be used.
How to verify it
Manually tested on physical testbed.
Previous command output (if the output of a command-line utility has changed)
New command output (if the output of a command-line utility has changed)