-
Notifications
You must be signed in to change notification settings - Fork 107
Disable logs when using YT uploader? #547
Comments
I was thinking of padding the success message with a line above and below so it sticks out more. Does freeseer not control the logging level for the installed version anyway? |
Sure, give it a try and see how it looks.
I don't remember, @zxiiro can probably answer that quicker. @MadMub to improve readability, we can also indent the list of videos found, that way it's easy to know that it "belongs" to the "Found videos" message at the top. |
We use python's logger, but I think the uploader shouldn't even hook into the logger. It's unnecessary for a shell application. |
To be clear the Youtube uploader has no dependencies on Freeseer and it's an independent too, even if it's started from the same CLI script. I think the uploader shouldn't be doing any log calls at all. Just use print statements. |
The logging will then be removed completely, as I was instructed to not
|
No we don't do anything special with the deployed version. The logger used to be configurable then some people on the project decided allowing the user to configure the logger was too confusing so we removed that completely. Logging is hard coded in this file [1]. [1] https://github.com/Freeseer/freeseer/blob/master/src/freeseer/__init__.py |
Where does the logging get called for the uploader? I don't see anywhere that we actually set it. Is this from an unmerged PR? |
The apiclient.discovery log does not come from us. We can surpress it with a call to logging.getLogger("apiclient").setLevel(logging.INFO) set logging.INFO to something that disables the log, I forget off the top of my head. EDIT: Actually a better way is this: logger = logging.getLogger('apiclient.discovery') logger.propagate = False EDIT2: You can leave logging in for debug purposes and disable it in the same way as my previous edit. |
@MadMub Regarding print strings in the API layer, that's right you shouldn't be printing in the API layer. The API could pass messages back to it's caller though and let the caller decide what to do with it. |
Logs are appearing alongside the printed output of the YT uploader, hindering usability.
Good for developers perhaps, completely unnecessary for users.
cc @MadMub
The text was updated successfully, but these errors were encountered: