Welcome Guest, Not a member yet? Register   Sign In
Remove Session Filehandler message from logs
#1

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!
Reply
#2

You can change $threshold:
https://codeigniter4.github.io/userguide...figuration
Reply
#3

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.
Reply
#4

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?
Reply




Theme © iAndrew 2016 - Forum software by © MyBB