With the work that has been done in recent months to de-globalise logging, more and more subsystems of PocketMine-MP now have their own dedicated logger for prefixing and for scope isolation.
This de-globalisation also offers an opportunity to make logging configuration much more flexible.
Proposal
That each logger should have a "log level", ordered in severity as per PSR-3. A logger will have a minimum log level, below which messages will be ignored (e.g. a minimum configuration of WARNING will cause INFO and DEBUG messages to be silenced).
Different subsystems will have their own loggers, which can each have their own minimum log level. This permits things such as having active plugin DEBUG loggers, while avoiding network DEBUG spam.
Example proposed pocketmine.yml configuration
logging:
default: debug #default logging level, subsystems configuration may override
network: info #silence network-specific debug, to avoid packet spam noise
plugins:
MyDevelopmentPlugin: debug
SomeNoisyPlugin: warning
Notes
This proposal is not final and I acknowledge that it's not perfect. Please give any feedback you might have.
With the work that has been done in recent months to de-globalise logging, more and more subsystems of PocketMine-MP now have their own dedicated logger for prefixing and for scope isolation.
This de-globalisation also offers an opportunity to make logging configuration much more flexible.
Proposal
That each logger should have a "log level", ordered in severity as per PSR-3. A logger will have a minimum log level, below which messages will be ignored (e.g. a minimum configuration of WARNING will cause INFO and DEBUG messages to be silenced).
Different subsystems will have their own loggers, which can each have their own minimum log level. This permits things such as having active plugin DEBUG loggers, while avoiding network DEBUG spam.
Example proposed
pocketmine.yml
configurationNotes
This proposal is not final and I acknowledge that it's not perfect. Please give any feedback you might have.