insanum / sncli

Simplenote CLI
MIT License
397 stars 35 forks source link

Logging should be configurable #57

Open samuelallan72 opened 7 years ago

samuelallan72 commented 7 years ago

Currently logging is hardcoded at the DEBUG level. This should be configurable via the cli and/or config file. This would allow a clean log that only has errors for normal usage, and full debug logging when testing/developing.

Also related, we don't really want the auth token in the logs - this shows since it seems requests is logging all the network requests at DEBUG level (and the sn auth token is present in the get params).

N0ury commented 3 years ago

Hi,

I'm currently using sncli all day long. I have a sync between different devices. It's really annoying to have the log file continously written. Is it possible to:

  1. add this feature to your todo list
  2. avoid this mode in the meantime (even with a workaround)

As you can see, sncli is a victim of its own success.

samuelallan72 commented 3 years ago

@N0ury ah wow it's been a while since I wrote this issue; I'd totally forgotten about it. Yep I can look into it sometime, but it'll be low on my priority list.

You're welcome to submit a pull request btw. :D The current logging config is set up here:

https://github.com/insanum/sncli/blob/2eeee22a2868d35d8aae00f8301da80348472fcf/simplenote_cli/sncli.py#L33-L41

I think a new config option to set the log level would be nice.

It's really annoying to have the log file continously written.

What's annoying about it btw?