sat
sat copied to clipboard
[Sat embedded]: a line of logs is triggered by `sat.New()` with `traceProvider == nil`
With Sat embedded, the sat.New()
function triggers a line of log even if the traceProvider
parameter equals nil
:
{"log_message":"(W) configured to use HTTP with no TLS","timestamp":"2022-06-05T11:47:03.328707564Z","level":2,"app":{"sat_version":"v0.1.4"}}
@k33g would you like something like a -q|quiet
mode flag that silences standard output on sat
completely, or is it this particular line that you would like to not be logged? Just trying to understand the motivation.
@flaki If I use Sat as usual (serving a runnable), I don't mind. But if I use Sat as a library to develop my own CLI, I want to be able to manage the output as I want. For example, If I code a CLI that returns me a list of restaurants for a given town, I only wish to the list of restaurants (without a log trace)
So, about the server mode, I would say that a -q|quiet
flag is perfect, but about the embedded way, I need complete control over what I want to display. Then I would like to be able to do it from the code, because I will probably handle my own flags and messages.