Hi All
Q: is there any way to tune the loglevel of the libmseed library?
Background:
I’m working on a utility that use the obspy seedlink client (obspy.seedlink.slclient.SLClient() ) and from the point of retrieving streams all works nicely (well done).
However, I get a lot of output to stderr that I would like to be able to better to control in order not to have my logfile growing to absurd sizes as the utility eventually will be run 24/7.
The SLClient class have the attribute loglevel that nicely can be used to tune the log level issued by the obspy native part (through the loggin module) but this does not seem to control the output from the libmseed library which outputs a lot of:
“GE_MORC__HHZ_D: Warning: Number of blockettes in fixed header (1) does not match the number parsed (2)”
which is not really of any use as I can not control the incoming packages (afaik) and in any case as the message seems to go directly to stderr I can’t make use of the information (e.g. assembling some statistics for the stream in question or whatever).
I could of course hack and recompile the source code myself but would prefer not to. Alternatively I could intervene the output to stderr from the utility and filter it before writing to file but this seems to be an undesirable alternative to me.
Ultimately I would like to send all messages to a ring buffer and only upon request or termination of the script dump the log to file or stdout (should be relatively easy by configuring a proper logging handler I think)
Any suggestions are welcome (sorry for the lengthy post)
regP