g3w-admin icon indicating copy to clipboard operation
g3w-admin copied to clipboard

Find out a way to filter out `GDAL_ERROR` and `Loading native module` from server logs

Open Raruto opened this issue 1 year ago • 1 comments

Checklist

  • [x] I've searched through the current issues to make sure this feature hasn't been requested already.

Motivation

Surely those messages are there for a useful reason, but we should try to find a decrease console clogs.

Sometimes things get hard to find within all this duplication..

2023-04-21 14:23:23 GDAL_ERROR 1: b'Unable to find driver ECW to unload from GDAL_SKIP environment variable.'
2023-04-21 14:23:23 GDAL_ERROR 1: b'Unable to find driver ECW to unload from GDAL_SKIP environment variable.'
2023-04-21 14:23:23 GDAL_ERROR 1: b'Unable to find driver JP2ECW to unload from GDAL_SKIP environment variable.'
2023-04-21 14:23:24 GDAL_ERROR 1: b'Unable to find driver ECW to unload from GDAL_SKIP environment variable.'
2023-04-21 14:23:24 GDAL_ERROR 1: b'Unable to find driver ECW to unload from GDAL_SKIP environment variable.'
2023-04-21 14:23:24 GDAL_ERROR 1: b'Unable to find driver JP2ECW to unload from GDAL_SKIP environment variable.'
2023-04-21 14:23:24 GDAL_ERROR 1: b'Unable to find driver ECW to unload from GDAL_SKIP environment variable.'
2023-04-21 14:23:24 GDAL_ERROR 1: b'Unable to find driver ECW to unload from GDAL_SKIP environment variable.'
2023-04-21 14:23:24 GDAL_ERROR 1: b'Unable to find driver JP2ECW to unload from GDAL_SKIP environment variable.'
2023-04-21 14:23:24 QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
2023-04-21 14:23:24 GDAL_ERROR 1: b'Unable to find driver ECW to unload from GDAL_SKIP environment variable.'
2023-04-21 14:23:24 GDAL_ERROR 1: b'Unable to find driver ECW to unload from GDAL_SKIP environment variable.'
2023-04-21 14:23:24 GDAL_ERROR 1: b'Unable to find driver JP2ECW to unload from GDAL_SKIP environment variable.'
2023-04-21 14:23:24 QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
2023-04-21 14:23:24 "Loading native module /usr/lib/qgis/server/libdummy.so"
2023-04-21 14:23:24 "Loading native module /usr/lib/qgis/server/liblandingpage.so"
2023-04-21 14:23:24 "Loading native module /usr/lib/qgis/server/libwcs.so"
2023-04-21 14:23:24 "Loading native module /usr/lib/qgis/server/libwfs.so"
2023-04-21 14:23:24 "Loading native module /usr/lib/qgis/server/libwfs3.so"
2023-04-21 14:23:24 "Loading native module /usr/lib/qgis/server/libwms.so"
2023-04-21 14:23:24 "Loading native module /usr/lib/qgis/server/libwmts.so"
2023-04-21 14:23:24 "Loading native module /usr/lib/qgis/server/libdummy.so"
2023-04-21 14:23:24 "Loading native module /usr/lib/qgis/server/liblandingpage.so"
2023-04-21 14:23:24 "Loading native module /usr/lib/qgis/server/libwcs.so"
2023-04-21 14:23:24 "Loading native module /usr/lib/qgis/server/libwfs.so"
2023-04-21 14:23:24 "Loading native module /usr/lib/qgis/server/libwfs3.so"
2023-04-21 14:23:24 "Loading native module /usr/lib/qgis/server/libwms.so"
2023-04-21 14:23:24 "Loading native module /usr/lib/qgis/server/libwmts.so"
2023-04-21 14:23:25 "Loading native module /usr/lib/qgis/server/libdummy.so"
2023-04-21 14:23:25 "Loading native module /usr/lib/qgis/server/liblandingpage.so"
2023-04-21 14:23:25 "Loading native module /usr/lib/qgis/server/libwcs.so"
2023-04-21 14:23:25 "Loading native module /usr/lib/qgis/server/libwfs.so"
2023-04-21 14:23:25 "Loading native module /usr/lib/qgis/server/libwfs3.so"
2023-04-21 14:23:25 "Loading native module /usr/lib/qgis/server/libwms.so"
2023-04-21 14:23:25 "Loading native module /usr/lib/qgis/server/libwmts.so"
2023-04-21 14:23:25 "Loading native module /usr/lib/qgis/server/libdummy.so"
2023-04-21 14:23:25 "Loading native module /usr/lib/qgis/server/liblandingpage.so"
2023-04-21 14:23:25 "Loading native module /usr/lib/qgis/server/libwcs.so"
2023-04-21 14:23:25 "Loading native module /usr/lib/qgis/server/libwfs.so"
2023-04-21 14:23:25 "Loading native module /usr/lib/qgis/server/libwfs3.so"
2023-04-21 14:23:25 "Loading native module /usr/lib/qgis/server/libwms.so"
2023-04-21 14:23:25 "Loading native module /usr/lib/qgis/server/libwmts.so"
2023-04-21 14:23:26 GDAL_ERROR 1: b'Unable to find driver ECW to unload from GDAL_SKIP environment variable.'
2023-04-21 14:23:26 GDAL_ERROR 1: b'Unable to find driver ECW to unload from GDAL_SKIP environment variable.'
2023-04-21 14:23:26 GDAL_ERROR 1: b'Unable to find driver JP2ECW to unload from GDAL_SKIP environment variable.'
2023-04-21 14:23:26 QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
2023-04-21 14:23:26 GDAL_ERROR 1: b'Unable to find driver ECW to unload from GDAL_SKIP environment variable.'
2023-04-21 14:23:26 GDAL_ERROR 1: b'Unable to find driver ECW to unload from GDAL_SKIP environment variable.'
2023-04-21 14:23:26 GDAL_ERROR 1: b'Unable to find driver JP2ECW to unload from GDAL_SKIP environment variable.'
2023-04-21 14:23:26 QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
2023-04-21 14:23:26 "Loading native module /usr/lib/qgis/server/libdummy.so"
2023-04-21 14:23:26 "Loading native module /usr/lib/qgis/server/liblandingpage.so"
2023-04-21 14:23:26 "Loading native module /usr/lib/qgis/server/libwcs.so"
2023-04-21 14:23:26 "Loading native module /usr/lib/qgis/server/libwfs.so"
2023-04-21 14:23:26 "Loading native module /usr/lib/qgis/server/libwfs3.so"
2023-04-21 14:23:26 "Loading native module /usr/lib/qgis/server/libwms.so"
2023-04-21 14:23:26 "Loading native module /usr/lib/qgis/server/libwmts.so"
2023-04-21 14:23:26 "Loading native module /usr/lib/qgis/server/libdummy.so"
2023-04-21 14:23:26 "Loading native module /usr/lib/qgis/server/liblandingpage.so"
2023-04-21 14:23:26 "Loading native module /usr/lib/qgis/server/libwcs.so"
2023-04-21 14:23:26 "Loading native module /usr/lib/qgis/server/libwfs.so"
2023-04-21 14:23:26 "Loading native module /usr/lib/qgis/server/libwfs3.so"
2023-04-21 14:23:26 "Loading native module /usr/lib/qgis/server/libwms.so"
2023-04-21 14:23:27 "Loading native module /usr/lib/qgis/server/libwmts.so"
2023-04-21 14:23:28 GDAL_ERROR 1: b'Unable to find driver ECW to unload from GDAL_SKIP environment variable.'
2023-04-21 14:23:28 GDAL_ERROR 1: b'Unable to find driver ECW to unload from GDAL_SKIP environment variable.'
2023-04-21 14:23:28 GDAL_ERROR 1: b'Unable to find driver JP2ECW to unload from GDAL_SKIP environment variable.'
2023-04-21 14:23:28 GDAL_ERROR 1: b'Unable to find driver ECW to unload from GDAL_SKIP environment variable.'
2023-04-21 14:23:28 GDAL_ERROR 1: b'Unable to find driver ECW to unload from GDAL_SKIP environment variable.'
2023-04-21 14:23:28 GDAL_ERROR 1: b'Unable to find driver JP2ECW to unload from GDAL_SKIP environment variable.'
2023-04-21 14:23:28 "Loading native module /usr/lib/qgis/server/libdummy.so"
2023-04-21 14:23:28 "Loading native module /usr/lib/qgis/server/liblandingpage.so"
2023-04-21 14:23:28 "Loading native module /usr/lib/qgis/server/libwcs.so"
2023-04-21 14:23:29 "Loading native module /usr/lib/qgis/server/libwfs.so"
2023-04-21 14:23:29 "Loading native module /usr/lib/qgis/server/libwfs3.so"
2023-04-21 14:23:29 "Loading native module /usr/lib/qgis/server/libwms.so"
2023-04-21 14:23:29 "Loading native module /usr/lib/qgis/server/libwmts.so"
2023-04-21 14:23:29 "Loading native module /usr/lib/qgis/server/libdummy.so"
2023-04-21 14:23:29 "Loading native module /usr/lib/qgis/server/liblandingpage.so"
2023-04-21 14:23:29 "Loading native module /usr/lib/qgis/server/libwcs.so"
2023-04-21 14:23:29 "Loading native module /usr/lib/qgis/server/libwfs.so"
2023-04-21 14:23:29 "Loading native module /usr/lib/qgis/server/libwfs3.so"
2023-04-21 14:23:29 "Loading native module /usr/lib/qgis/server/libwms.so"
2023-04-21 14:23:29 "Loading native module /usr/lib/qgis/server/libwmts.so"

Suggested solution

  1. as per GDAL_ERROR I've found this topic: GDAL and Python - Don't print GDAL Error messages
  2. an alternative solution might be to print all those messages only once per server reboot (but really, I don't know how feasible it could be)

Alternatives considered

No response

Raruto avatar Apr 21 '23 12:04 Raruto