Add a way to simplify cli logging
See original GitHub issueSimplifying log messages
Currently structured logging can be a bit difficult to read on a local terminal. It is possible to simplify the logging using the logging.yaml
, but there is still a lot of extra information that makes it a bit cumbersome to understand what is going on.
As an example in the following log:
{'consumer': False, 'producer': True, 'string_id': 'tap-postmark', 'cmd_type': 'elb', 'stdio': 'stderr', 'name': 'tap-postmark', 'event': 'time=2022-06-11 19:55:20 name=tap-postmark level=INFO message=Tap has custom mapper. Using 1 provided map(s).', 'level': 'info', 'timestamp': '2022-06-11T19:55:20.971174Z'}
It would be great to be able to only print the message:
Tap has custom mapper. Using 1 provided map(s).
Errors
It is also the case when an error occurs. All the extra information makes it quite difficult to understand the error:
Issue Analytics
- State:
- Created a year ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
cli: simplify the configuration of logging · Issue #51007 ... - GitHub
Today we have two flags --log-dir and --sql-audit-dir that configure the main logging directory and the SQL audit log directory separately.
Read more >How to customize your Ansible logs | Enable Sysadmin
I will show you how to change the default standard output logger, add additional metadata to your output, and log to a file....
Read more >Command-line interface - Logging - Google Cloud
The Google Cloud CLI has a group of commands, gcloud logging , that provide a command-line interface to the Logging API. A summary...
Read more >PowerShell and Command Line Logging | LogRhythm
The first step is getting PowerShell to log detailed command line ... as well as a few ways to configure within LogRhythm to...
Read more >How to change maven logging level to display only warning ...
Answering your question. I made a small investigation because I am also interested in the solution. Maven command line verbosity options.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@tayloramurphy no sounds like @JulesHuisman found logging.yaml already and has a sense of what knobs he can turn.
A logger that would only print
Tap has custom mapper. Using 1 provided map(s).
without other fields probably isn’t very useful in many cases. Especially once we introduce parallel runs. If you runmeltano run tap mapper target tap2 mapper target2
its handy knowing things like whether a line was produced by “tap1” or “target2”. Some of it definitely come down to personal preference. We probably just need to be able to support more formatting/structure options out of the box.Now that run’s been around a while we could also suppress/remove some fields though (e.g. cmd_type).
@pandemicsyn Thanks for the
jq
tip, might come in handy.Having the option to simplify logging further would be great! But the priority of this feature is not that high, we can manage for the time being 😃