Needed to attach a custom logger to DNSLogger, format was fine, but needed to overload every method as print was used...
It would have been so much better if there was a log_print or _print or _output method in the DNSLogger class instead.
Then using a customer logger w/o format change would be much simpler.
If you could implement this would be great. :) Great code, btw!
That's a really good idea, thanks. I've added logf parameter in the DNSLogger constructor and released a new version (https://pypi.org/project/dnslib/0.9.19/)
Not an issue as such, but
Needed to attach a custom logger to
DNSLogger
, format was fine, but needed to overload every method as print was used... It would have been so much better if there was alog_print
or_print
or_output
method in the DNSLogger class instead. Then using a customer logger w/o format change would be much simpler. If you could implement this would be great. :) Great code, btw!https://github.com/paulc/dnslib/blob/729a655b069303de089a9ca3904378b15dd17ff1/dnslib/server.py#L178-L302