Closed mawashii closed 9 months ago
The reason of unit test logging behaviour is the fact, that (current) abseil doesn't fully support negative loglevels. You can set negative loglevel for filtering, but loglevel of all log entries is normalised to 0 (INFO). This makes shaka VLOG macro quite useless - all logging messages behave as logged by LOG(INFO) and displayed (as IXXX). It's quite annoying for verbose modules, like MPEG-TS parser
I'm not sure why there is no log verbose at all in application - maybe loglevel is not INFO.
Note: verbose logging support and VLOG macro was recently added into abseil - https://github.com/abseil/abseil-cpp/commit/7b6c17e378224844d8663a410da2da5353b205b9 and later fixes.
I noticed that the --v
cli option no longer exist as well testing on latest main.
Probably dropped as part of this PR: https://github.com/shaka-project/shaka-packager/pull/1337
@joeyparrish Is there some new flag to control log verbosity that should be used instead (I couldn't find any in the help text)?
VLOG() macros were added to absl as noted by @modernletter, and a newer version was adopted by us in #1337. This should result in all logging flags being provided by absl directly.
I see this issue is from December 27, so let me see if I can reproduce it or today's comment from @petzeb with the latest source from main
.
Confirmed:
$ ./build/packager/packager --v=5
ERROR: Unknown command line flag 'v'. Did you mean: iv ?
$ ./build/packager/packager --minloglevel=4
ERROR: Unknown command line flag 'minloglevel'
I'll dig into this.
The absl::log_flags target was being stripped by the linker. PR coming soon.
@joeyparrish awesome! thanks for the quick fix!
Happy to help. Thanks for alerting us to the problem!
In response to the original issue, and why the application behaves differently to the test app, The --stderrthreshold
option is limitting the console output. Setting this to 0 allows the logs to be controlled as expected with --v
. This is explained in https://github.com/abseil/abseil-cpp/issues/1537. Maybe the app should set up a default stdout log sink?
I think we should default stderrthreshold to 0. Since we don't have another sink by default, I would expect minloglevel and v to "just work" without stderrthreshold.
I put up PR #1350 for this.
System info
Operating System: Ubuntu 20.04.6 LTS / Debian GNU/Linux 12 (bookworm) Shaka Packager Version: packager version 3e71302b-debug (current
HEAD
)Issue and steps to reproduce the problem
Packager Command:
./packager --dump_stream_info input=testing.mp4 --v=9
I have tried all variations of the
--v
flag, I've also triedvmodule
(deprecated), I've tried combinations with--minloglevel
and--stderrthreshold
which are new flags since the build system change but nothing can convince the tool to print more.I've tried both a
Release
and aDebug
build offHEAD
. I can see that theDebug
build does all theDCHECK
stuff because if I use it to encrypt/decrypt something it takes longer than theRelease
build. But none of them print anything remotely verbose let alone the "normal" non-verbose output from the previous log system likeDemuxer::Run()
message as seen below.When I run
./build/packager/packager_test
however I do get the verbose logging output I'm expecting even if the formatting looks a bit off.I do not see what it does different if at all to explain why it has verbose logging but my invocation from CLI does not.
I've tried the build I created on 2 different systems (Debian+Ubuntu) and in different shells (zsh+bash) just in case it makes a difference for some reason, but it does not appear that way. I do not know what else I can try to rule out an error on my end. The previous shaka build (v2.6.1) works fine with the same arguments.
What is the expected result?
What happens instead?