CodeIgniter Forums
Remove Session Filehandler message from logs - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30)
+--- Thread: Remove Session Filehandler message from logs (/showthread.php?tid=81422)



Remove Session Filehandler message from logs - vikki76 - 02-27-2022

This question is also asked here -https://stackoverflow.com/questions/68920982/codeigniter-4-hide-session-class-initialized-message and I have same query
How do I removeĀ  Session: Class initialized using 'CodeIgniter\Session\Handlers\FileHandler' driver from my codeigniter logs , they are filling up entire server log file. Multiple of them.

I am using CodeIgniter 4 on ubuntuĀ  ( production)

Thanks!


RE: Remove Session Filehandler message from logs - kenjis - 02-27-2022

You can change $threshold:
https://codeigniter4.github.io/userguide/general/logging.html#configuration


RE: Remove Session Filehandler message from logs - rich8374 - 07-21-2022

I'm also having this problem. The .env file sets CI_ENVIRONMENT to production and $threshold is set to the default value of 4 but the following INFO messages are still being logged:
INFO - 2022-07-21 00:10:49 --> Used the default controller.
INFO - 2022-07-21 00:10:49 --> Session: Class initialized using 'CodeIgniter\Session\Handlers\FileHandler' driver.


RE: Remove Session Filehandler message from logs - CCAldo - 02-09-2023

PHP Code:
// Config/Logger.php
// remove 7: Info - Interesting events, like user logging in, etc.
public $threshold = [1234568]; 

Why do we need that info-log?
Can we remove that specific info message, not by changing the threshold; but just exclude that specific one?


RE: Remove Session Filehandler message from logs - negrusti - 12-20-2024

This message should be moved to DEBUG level. Changing Threshold is not a solution, we need INFO level for our app purposes.