Last updated: August 12th, 2023

Provides a Stoic\Log\AppenderBase appender to output log messages to a file.


use Stoic\Log\Logger;
use Stoic\Utilities\FileHelper;
use Stoic\Utilities\LogFileAppender;

$log = new Logger();
$fh  = new FileHelper('./');
$log->addAppender(new LogFileAppender($fh, '~/logs/audit.log'));

$log->info("Testing log info output");


		Logger will now output to ./logs/audit.log (date format is displayed in UTC time):

Y-m-d G:i:s.u INFO     Testing log info output

Further Reading

Next Up

Continue to read about the ParameterHelper class, or visit the Table of Contents.