I want to create for each session an own logfile.
I have seen that it is possible to create an own logger (source):
use Monolog\Logger;
use Monolog\Handler\StreamHandler;
// create a log channel
$log = new Logger('name');
$log->pushHandler(new StreamHandler('path/to/your.log', Logger::WARNING));
// add records to the log
$log->addWarning('Foo');
$log->addError('Bar');
Is it possible to connect it to a session directly using a service or implemented monolog handler?
Overwriting the path is clear for me.