I'm using the c bindings for taglib 1.6.3. When opening a file with taglib_file_new
, messages are printed to stderr. How can I control and use these messages? In particular, I would like to catch and handle some of the errors, and secondly I want to TURN OFF the verbose logging to stderr.
Asked
Active
Viewed 391 times
2

jmilloy
- 7,875
- 11
- 53
- 86
2 Answers
2
Unfortunately, you can't catch them, but if you compile TagLib in release mode (cmake -DCMAKE_BUILD_TYPE=Release
), the messages won't be printed.

Lukáš Lalinský
- 40,587
- 6
- 104
- 126
-
Thanks I'm about to try this. I added taglib straight from the repositories with apt-get. Why is the default mode debug mode instead of release mode? – jmilloy May 17 '11 at 02:29
-
I don't know, that's just how CMake does this by default. – Lukáš Lalinský May 17 '11 at 17:03
1
You could effectively hide the error messages by reopen
:ing stderr
. If you want to silence it totally, you could redirect it to some kind of null device or internal log file. Otherwise, I guess that you would need to filter them out.
Another approach would be to modify taglib itself, which should work as the source is provided.

Lindydancer
- 25,428
- 4
- 49
- 68