Logging in project
semlanik muokkasi tätä sivua 5 vuotta sitten

qtprotobuf defines support library-wide logging mechanism based on QLoggingCategory

Note: This logging mechanism only applicable for qtprotobuf support library.

Include following header to use qtprotobuf logging:

#include "qtprotobuflogging.h"

By default all log levels are enabled. They could be controlled by changing QT_LOGGING_RULES environment variable.

Example:

QT_LOGGING_RULES="qtprotobuflog.debug=false" #disables qtprotobuflog debug traces

QT_LOGGING_RULES="qtprotobuflog.*=false" #disables all qtprotobuflog traces