question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add a way to simplify cli logging

See original GitHub issue

Simplifying 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: image

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
pandemicsyncommented, Jun 23, 2022

@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 run meltano 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).

0reactions
JulesHuismancommented, Jun 24, 2022

@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 😃

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found