Details
-
Sub-task
-
Resolution: Fixed
-
None
-
None
-
None
-
Empty show more show less
Description
Since runtime debugging can consume much of resources (custom backtrace, dump of complex object tree) we have to provide different debuglevels.
Level 0: No debugging / logging at all. The corresponding script files were not loaded, no loggers are invoked.
Level 1: Default logging. Only Basic information is provided.
Level 2: Extended logging. Contains the last 10 requests, a backtrace and a dump of the application state by the usage of the controller data gathering methods.
Switching between the debug levels is possible on two ways:
A user specific debuglevel defined in the database in the user table. No frontend is needed here to change the user specific level since this is a developer used feature only.
A global debuglevel is set in the application.ini, and overwrites the user specific debuglevel if the global one is bigger.
Additional Info to the log levels to be used
Instead of the above mentioned levels (old concept) the following should be used:
Compared to several commonly used logging facilities we should use the following log levels:
- FATAL (FATAL PHP errors, other very fatal stuff, wrong PHP version or so)
- ERROR (User locked out due multiple wrong login, common unhandled exceptions)
- WARN (user entered wrong password)
- INFO (for example user logins, wanted exceptions BadMethodCall on known non existent methods (HEAD), other known and wanted exceptions)
- DEBUG (debugging on a level also useful for SysAdmins)
- TRACE (tracing debugging on a level only useful for developers)
Explanation how to use which level: https://stackoverflow.com/a/2031209/1749200
Sources to the log levels: