temporalio / cli

Command-line interface for running Temporal Server and interacting with Workflows, Activities, Namespaces, and other parts of Temporal
https://docs.temporal.io/cli
MIT License
243 stars 32 forks source link

[Bug] Print to stderr instead of using a logger for warnings/errors #567

Open dandavison opened 2 months ago

dandavison commented 2 months ago

In general, CLIs are not expected to produce logging output: they take in stdin and command line args, and output stdout and stderr. Our CLI does have at least one exception: we start a server with start dev. However, warnings and errors from short "transactional" commands should just be printed to stderr as plain natural language, without timestamps or other metadata.

One example of a current violation is

$ temporal operator namespace create default
time=2024-05-17T17:42:01.766 level=WARN msg="Passing the namespace as an argument is now deprecated; please switch to using -n instead"