Skip to content

Add a CLI or configuration option to send logs to stderr #132

@kriszyp

Description

@kriszyp

Feature Summary

For many CLI operations, it can be very convenient to rely on stdout to only have the intended CLI output (for piping purposes), and not have log messages mixed in (which can occur with config like level: trace and stdStreams: true). We would like to be able to configure and/or set the behavior so you can tell the logger to send logs only to stderr.

Problem This Solves

This makes it easier to use the CLI with piping/scripting.

Proposed Solution

A CLI argument of --log-to-stderr could work. Or a configuration option like stdStreams: 'stderr'. Or an env variable like HARPER_LOG_TO_STDERR. 🤷

User Stories

No response

Alternatives Considered

No response

Priority/Impact

None

Examples or References

No response

Additional Context

No response

Are you planning to fix this issue?

No, just reporting the issue

First-time contributor support

  • I'm new to contributing and would appreciate guidance on the process
  • I'd like help understanding the project structure
  • I need assistance with setting up the development environment
  • I'm comfortable contributing, but new to this project specifically

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions