By default, most log messages are enabled. In particular, this means that errors logged by wxWidgets code itself (e.g. when it fails to perform some operation, for instance
wxFile::Open()
logs an error when it fails to open a file) will be processed and shown to the user. To disable the logging entirely you can usewxLog::EnableLogging()
method or, more usually,wxLogNull
class which temporarily disables logging and restores it back to the original setting when it is destroyed.
参考
- https://docs.wxwidgets.org/3.1.3/overview_log.html#overview_log_enable
- https://docs.wxwidgets.org/3.1.3/classwx_log_null.html