-
Notifications
You must be signed in to change notification settings - Fork 201
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
Add verbosity flag #1429
Comments
I have a branch with structured logging and tracing with opentracing that I think will work well for this issue. My plan is to switching to opentelemetry, and then submit a PR with just the plumbing for this, and a feature flag to toggle it. Then we can slowly convert existing log messages over to structured logs. All logs are emitted to stderr, and only the command output goes to stdout. So even messages like "Building invocation image" go to stderr in the new scheme. Instead of log levels with numbers, I'm experimenting with allowing to filter on associated key value pairs on the logs.
This will let us see a ton of info in jaeger and not rely so much on print debugging. I'm having logs printed to the output in plaintext, optionally printed as the structured logs, writing the structured logs to a file in ~/.porter/logs, and also sending them to jaeger (if tracing is enabled). I am still thinking through how to apply filters to the 3 different sinks: jaeger, structure log file, and console output. I think people will want to be able to tune the firehose, mostly to limit data usage, so we may end up with log.level, console.level and trace.level, with a global level that will set all 3 at once for simplicity. Because I can totally see tracing at debug level, just in case, but only showing errors to the console or some other combination. |
We still need this in v1 for two reasons: backwards incompatible changes to output format and flags, and if anyone is using porter in production we really want the code fully instrumented so we can troubleshoot. |
I'd like to have two configurable settings: a flag to control how verbose the console output is, and another to control how much is sent to the tracer/logger. That way I can run at a level that isn't overwhelming and if a command fails go look up the extra info from the log file or jaeger. |
Separately, the log-level configuration setting controls how much is output to the log file (if any): # ~/.porter/config.yaml
logs:
log-to-file: true # turn on the log file
log-level: debug # dump all logs into the file You can do a mix:
Then the console would only show errors, and the log file would contain debug through error messages. if you run |
Closed by #2258. |
What design is being proposed?
Replace
--debug
and--debug-plugins
andporter build --verbose
with a single--verbosity|v
flag.#1353
🚨 This needs a PEP.
The text was updated successfully, but these errors were encountered: