For an application, I want to be able to log usefull informations in logs, alongside the errors and others logs. Doing so to next create a log viewer in my admin to access it easily.
The problem is that when I use the L_INFO levels, log wont works until I change the log_threshold config entry. But if I do so, A bunch of fuel internal infos will be written in logs for each request.
So I can add a log level entry but to do so I have to duplicate the Log class in my app folder, and the fuel class to, because log levels are Fuel class constants, and TBH, I would appreciate a better solution.
These levels are mapped to Fuel constants: L_DEBUG = 100; L_INFO = 200; L_WARNING = 300; L_ERROR = 400;
which means 250, 500, 550 and 600 are still available for use. You can use your own constants, extend the Fuel class and add them there, or simply use the numbers.
So say you create a global constant L_NOTICE = 250, you can configure your config file like so
'log_threshold' => L_NOTICE,
which would cause everything 250 and above to be logged.