You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$logFile = 'log/app.log';
$reader = newLogReader($logFile);
foreach ($readeras$log) {
echosprintf("The log entry was written at %s. \n", $log['date']->format('Y-m-d h:i:s'));
}
My Logfile has 45 entries.
i get this error: Call to a member function format() on null at line echo sprintf("The log entry was written at %s. \n", $log['date']->format('Y-m-d h:i:s'));
The text was updated successfully, but these errors were encountered:
Hello,
i have tested your example and i get an error.
my code
My Logfile has 45 entries.
i get this error:
Call to a member function format() on null at line echo sprintf("The log entry was written at %s. \n", $log['date']->format('Y-m-d h:i:s'));
The text was updated successfully, but these errors were encountered: