$pluginloglevel = LBSystem::pluginloglevel();
This function returns the currently set plugin loglevel, that the user has set in the plugin management.
This function is available starting with LoxBerry V1.0.3. If you use that function, set this minimum version in your plugin.cfg.
With this function you can access the users set loglevel for your plugin in the plugin management. Therefore, you do not need to implement an own setting of loglevel or debug mode in your plugin. To show the loglevel setting to the user, you have to enable the custom log setting in plugin.cfg by
The function returns a loglevel between 0 and 7. They follow the severity levels of LoxBerry in common, and are documented here: plugindatabase.dat. In short, level 7=DEBUG, level 3=ERROR and level 0=EMERGE, that can be equaled to "Off".