Welcome Guest, Not a member yet? Register   Sign In
Unecessary Log File Entries?
#1
Question 

So far I've come across these log file entries that appear to document normal operation of the code (vs warnings or errors)... which means they are probably only cluttering log files (and don't seem to add very much value (?)):

In system/Security/Security.php
   log_message('info', 'CSRF token verified.');

In system/Session/Session.php:
    $this->logger->info("Session: Class initialized using '" . $this->config->driver . "' driver.");

There are probably many others (?).

Is there a good reason for them that I can't see (considering a lot more detail is likely available in other logs (like the Apache logs))?... and there is no easy way to stop this logging (without commenting in the system code), is there?
Reply
#2

They are INFO level logs.
See https://codeigniter4.github.io/CodeIgnit...log-levels

You can modify which levels are actually logged.
See https://codeigniter4.github.io/CodeIgnit...figuration
Reply
#3

(This post was last modified: 02-09-2024, 02:36 PM by Gary.)

(01-26-2024, 06:26 PM)kenjis Wrote: They are INFO level logs.
See https://codeigniter4.github.io/CodeIgnit...log-levels

You can modify which levels are actually logged.
See https://codeigniter4.github.io/CodeIgnit...figuration

Thanks Kenjis, and for the reference links.

I did, in my delirium, eventually realize that the development machine (that had been running for ages in production mode for testing) had been put back into the development environment mode and accidentally left in this state... which was why the INFO level events were being logged... so it was an oversight on my part.

I would donate you some of my Reputation, but I see I have none.  Smile
Reply




Theme © iAndrew 2016 - Forum software by © MyBB