require __DIR__ . '/vendor/autoload.php'; $log = new MonologLogger('name'); $log->pushHandler(new MonologHandlerStreamHandler('app.log', MonologLogger::WARNING)); $log->warning('Foo');