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

Changes to the log level only affect the 'sigal' logger #502

Open
Canyoneer opened this issue Oct 19, 2023 · 3 comments
Open

Changes to the log level only affect the 'sigal' logger #502

Canyoneer opened this issue Oct 19, 2023 · 3 comments

Comments

@Canyoneer
Copy link

The --verbose and --debug options only change the log level for the 'sigal' logger. This means that many logging messages will still not be visible, since they use a logger with a different name derived from the modules name. For example 'sigal.video' inside the video module, but also other modules, plugins and libaries.

In my chase the system couldn't find ffmpeg and couldn't get a proper log even with the --debug option.

I changed this in my local build by adding "logging.basicConfig(level=level)" at the start of the init_logging function. But I have no idea if this is the right way to do this.

@saimn
Copy link
Owner

saimn commented Nov 8, 2023

I cannot reproduce, the submodule loggers inherit the parent's configuration. Example with the test gallery after adding some fake option to ffmpeg:

DEBUG: Video size: 240, 98 -> 480, 360
DEBUG: Processing video: ffmpeg -i /home/simon/dev/sigal/tests/sample/pictures/video/example video.ogv -y -crf scoubidou 10 -b:v 1.6M -qmin 4 plop-qmax 63 /home/simon/dev/sigal/tests/sample/_build/video/example video.webm
DEBUG: STDOUT:
 
DEBUG: STDERR:
 ffmpeg version n6.0 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 13.2.1 (GCC) 20230801
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libjxl --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librav1e --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpl --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-nvdec --enable-nvenc --enable-opencl --enable-opengl --enable-shared --enable-version3 --enable-vulkan
  libavutil      58.  2.100 / 58.  2.100
  libavcodec     60.  3.100 / 60.  3.100
  libavformat    60.  3.100 / 60.  3.100
  libavdevice    60.  1.100 / 60.  1.100
  libavfilter     9.  3.100 /  9.  3.100
  libswscale      7.  1.100 /  7.  1.100
  libswresample   4. 10.100 /  4. 10.100
  libpostproc    57.  1.100 / 57.  1.100
Unrecognized option 'crf scoubidou'.
Error splitting the argument list: Option not found

@Canyoneer
Copy link
Author

Canyoneer commented Nov 14, 2023

Thanks for the feedback. I'm quite certain now that this issue is OS specific. I testet it on Debian 12 and --debug works fine there. On Windows it does not. Have you tested on Windows?

It seems that multiprocessing works differently on Windows (no fork), so the log is not inherited on Windows subprocesses. But I couldn't find a recommended solution for this yet.

@saimn
Copy link
Owner

saimn commented Nov 22, 2023

No I have never tested on Windows. There are some bug report on Windows ( windows ) so I guess it more or less works but I cannot help with the debugging ;). Also would be great to have a CI job on Windows, if someone is motivated to do that (and fix the bugs :)).

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

No branches or pull requests

2 participants