blenderlab / BattleIA

Client/Server app for Adimaker IT curses
2 stars 19 forks source link

Logging system #28

Closed rfleuryleveso closed 3 years ago

rfleuryleveso commented 3 years ago

Added a logging system to BattleIA. Changed a few logging instructions to the system.

The logging System should be used as follow: BattleLogger.logger.info("Starting BattleIA", arg1, arg2, arg3...);

You can use different log levels: info, debug, error, warning. BattleLogger.logger.info("Starting BattleIA"); BattleLogger.logger.debug("Starting BattleIA"); BattleLogger.logger.error("Starting BattleIA"); BattleLogger.logger.warning("Starting BattleIA");

Coming up next is the ability to define a minimum logging level. Log Levels are defined by RFC5424: https://tools.ietf.org/html/rfc5424

You can use BattleLogger.logger.log(BattleLogLevel.CRITICAL, "Starting BattleIA");