2

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.

jmilloy
  • 7,875
  • 11
  • 53
  • 86

2 Answers2

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
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