Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Useless logs #2313

Merged
merged 3 commits into from
Nov 2, 2018
Merged

Useless logs #2313

merged 3 commits into from
Nov 2, 2018

Conversation

ferdnyc
Copy link
Contributor

@ferdnyc ferdnyc commented Nov 2, 2018

On more than one previous occasion I've started larger, more ambitious efforts in this regard... and ultimately got nowhere with them. So, this time I decided to just make a quick, targeted strike against some of the worst offenders: The log messages that are output every time, on every launch of OpenShot, and exactly the same each time... messages which serve no purpose except to clutter the logs and obscure useful data.

These are those, and this PR eliminates them with prejudice. See individual commit messages for details.

Eliminate massive startup spam logging:
```
ui_util:INFO Binding event MainWindow:actionSaveAs_trigger
ui_util:INFO Binding event MainWindow:actionImportFiles_trigger
 ```
 Approx. reduction: 71 lines of output
The icon loader outputs a **warning** level log message each time it 
doesn't find an icon in the current theme and has to fall back to the 
packaged Humanity icons, even though this is a normal and expected 
action (especially with AppImages).
```
ui_util:WARNING Icon theme gtk-edit not found. Will use backup icon.
ui_util:WARNING Icon theme package-upgrade not found. Will use backup 
icon.
ui_util:WARNING Icon theme im-message-new not found. Will use backup 
icon.
```
Approx. reduction: 15-68 lines of output (depending on icon availability 
in the current theme)
The effects_model outputs a log message containing just the category 
name for each effect loaded, which (out of context) is useless, annoying 
repetition.

Actual startup output of 2.4.3:
```
effects_model:INFO category: Video
effects_model:INFO category: Video
effects_model:INFO category: Video
effects_model:INFO category: Video
effects_model:INFO category: Video
effects_model:INFO category: Video
effects_model:INFO category: Video
effects_model:INFO category: Video
effects_model:INFO category: Video
effects_model:INFO category: Video
effects_model:INFO category: Video
effects_model:INFO category: Video
effects_model:INFO category: Video
effects_model:INFO category: Video
```
Exact reduction: All of that
@DylanC
Copy link
Collaborator

DylanC commented Nov 2, 2018

@ferdnyc - I'm happy to see some less logging. That fallback icon log was especially annoying. 👍

@DylanC DylanC merged commit bca04c2 into OpenShot:develop Nov 2, 2018
@ferdnyc
Copy link
Contributor Author

ferdnyc commented Nov 2, 2018

That fallback icon log was especially annoying.

Especially since it was a WARNING. #ForSomeReason!

OpenShot: "Look out!! Something completely expected and unremarkable just happened!!"
...And you're telling me this why?

@ferdnyc ferdnyc deleted the useless-logs branch November 2, 2018 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants