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

Adjust log levels #3724

Merged
merged 15 commits into from
Sep 23, 2020
Merged

Adjust log levels #3724

merged 15 commits into from
Sep 23, 2020

Conversation

MartinThoma
Copy link
Contributor

Related to issue #3708

@MartinThoma
Copy link
Contributor Author

I've also seen a couple of print statements where I wonder if they should be log messages:

blender/scripts/earth.py:179:print("EmptyPointA Transform Rotation: Y= %f Z= %f" % (point_a["lat"], point_a["lon_Z"]))
blender/scripts/earth.py:180:print("EmptyPointB Transform Rotation: Y= %f Z= %f" % (point_b["lat"], point_b["lon_Z"]))
blender/scripts/earth.py:181:print("EmptyPointC Transform Rotation: Y= %f Z= %f" % (point_c["lat"], point_c["lon"]))
blender/scripts/earth.py:182:print("EmptyPointD Transform Rotation: Y= %f Z= %f" % (point_d["lat"], point_d["lon"]))
blender/scripts/earth.py:183:print("EmptyPointC.001 Transform Location: X= %f" % location_CD)
blender/scripts/earth.py:184:print("EmptyPointD.001 Transform Location: X= %f" % location_CD)
blender/scripts/earth.py:185:print("EmptyCam Frame 20 ->Transform Rotation: Y= %f Z= %f  And press I key" % (point_a["lat"], point_a["lon_Z"]))
blender/scripts/earth.py:186:print("EmptyCam Frame 80 ->Transform Rotation: Y= %f Z= %f  And press I key" % (point_b["lat"], point_b["lon_Z"]))
blender/scripts/dissolve.py:272:print(material_object)
blender/scripts/dissolve.py:275:print(material_object)
classes/info.py:105:    print("Compiled translation resources missing!")
classes/info.py:106:    print("Loading translations from: {}".format(language_path))
emojis/optimize-emojis.py:57:        print('Removed emoji: %s' % emoji_path)
emojis/optimize-emojis.py:64:print('Emojis Optimized (%s removed)!' % emoji_removed_count)
language/show_translations.py:47:print("Scanning {} strings in all translation files...".format(len(all_strings)))
language/show_translations.py:59:        print("\n=================================================")
language/show_translations.py:60:        print("Showing translations for {}".format(filename))
language/show_translations.py:61:        print("=================================================")
language/show_translations.py:66:                print('  {} => {}'.format(source_string,translated_string))
language/test_translations.py:52:    print("Testing {} strings in {}...".format(len(all_strings), template_name))
language/test_translations.py:64:            print(red, '%s-%s' % (success, lang_code), endc)
language/test_translations.py:71:                    print(red, '\tInvalid string replacement found: "%s" vs "%s" [%s]' %
launch.py:86:        print("OpenShot version %s" % info.SETUP['version'])
launch.py:97:        print("Supported Languages:")
launch.py:99:            print("  {:>12}  {}".format(lang[0],lang[1]))
launch.py:107:                    print("Added {} to PYTHONPATH".format(os.path.realpath(p)))
launch.py:109:                    print("{} does not exist".format(os.path.realpath(p)))
launch.py:111:                    print("Bad path {}: {}".format(p, ex))
launch.py:124:            print("Unsupported language '{}'! (See --list-languages)".format(args.lang))
launch.py:128:    print("Loaded modules from: %s" % info.PATH)
windows/views/timeline_webview.py:2001:            print('has_audio_data: %s' % has_audio_data)
windows/main_window.py:1629:            print("actionInsertKeyframe")

Copy link
Contributor

@ferdnyc ferdnyc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for putting this together! It's much appreciated. I suggested a few tweaks inline, and tried to provide my reasoning on them as well.

@ferdnyc
Copy link
Contributor

ferdnyc commented Sep 20, 2020

I've also seen a couple of print statements where I wonder if they should be log messages:

For the most part, no.

  • The ones in the Blender code run inside their Python interpreter, not our process.
  • classes/info.py and launch.py run during initial commandline processing in the pre-startup phase, before logging is initialized. (Some of those statements are the commandline processing, in fact.)
  • language/test_translations.py, language/show_translations.py, and emojis/optimize-emojis.py are all utility scripts.

These two, however, should indeed be logging statements. Thanks for catching those.

windows/views/timeline_webview.py:2001:            print('has_audio_data: %s' % has_audio_data)
windows/main_window.py:1629:            print("actionInsertKeyframe")

MartinThoma and others added 12 commits September 20, 2020 10:30
Co-authored-by: Frank Dana <ferdnyc@gmail.com>
Co-authored-by: Frank Dana <ferdnyc@gmail.com>
Co-authored-by: Frank Dana <ferdnyc@gmail.com>
Co-authored-by: Frank Dana <ferdnyc@gmail.com>
Co-authored-by: Frank Dana <ferdnyc@gmail.com>
Co-authored-by: Frank Dana <ferdnyc@gmail.com>
Co-authored-by: Frank Dana <ferdnyc@gmail.com>
Co-authored-by: Frank Dana <ferdnyc@gmail.com>
Copy link
Contributor

@ferdnyc ferdnyc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking good now, thanks! Only one required change, a small typo on one of the exception classes. But with that fixed, this looks good to go from my POV.

MartinThoma and others added 2 commits September 22, 2020 19:04
Co-authored-by: Frank Dana <ferdnyc@gmail.com>
Co-authored-by: Frank Dana <ferdnyc@gmail.com>
@MartinThoma
Copy link
Contributor Author

@ferdnyc Thank you so much for all of the feedback! I think I added all of the requested changes, but it still shows me "1 change requested". I don't know why.

@ferdnyc
Copy link
Contributor

ferdnyc commented Sep 22, 2020

@MartinThoma Thanks! I think that might mean simply that I requested changes, and haven't come back to "accept" the new commits. (IOW, it's more like "1 reviewer requested changes". GitHub Is Confusing™.)

No matter, reviews don't block merges in the repo, so it could go in regardless. I'll take a look this evening when I'm back at my computer, and we should be all set. Thanks again!

@ferdnyc
Copy link
Contributor

ferdnyc commented Sep 23, 2020

Yup, as I suspected the "1 change" is dumb and was just counting the number of reviewers who selected "Approve" or "Request Changes" instead of "Comment", it wasn't actually tracking the changes that needed to be made. All looks good now, merging — thanks again!

@ferdnyc ferdnyc merged commit d07defe into OpenShot:develop Sep 23, 2020
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