Rerouting debug/warning messages from taglib?

Scott Wheeler scott at taglib.org
Tue Mar 3 08:51:08 GMT 2020


On Feb 26, 2020, at 09:11, maporter at tutanota.com wrote:
> 
> Hello, apologies if this is something that can already be done, however I have written a program that scans a large directory of music. Some of the files are kinda broken and TagLib spits out a bunch of messages such as
> 
> > TagLib: ID3v2.4 no longer supports the frame type RVA.  It will be discarded from the tag.
> > TagLib: FLAC::File::scan() -- FLAC stream not found
> 
> I pored over my own code and made sure that I wasn't already spitting out these errors myself somewhere, although it's entirely possible I missed something.
> 
> I am using a separate logging library (spdlog) and I would like to be able to reroute these messages to my regular logs, and add info to them such as the file being read. Is this supported? I checked the docs and looked through the bug tracker and didn't find anything.

TagLib only prints those when it's compiled in debug mode, so you probably don't need to worry about it at all.

If you really care, you can call setDebugListener() to register a logger:

https://taglib.org/api/namespaceTagLib.html#a09a7dd52f5edeeb602c89e8ab8936d1d

-Scott


More information about the taglib-devel mailing list