本文整理汇总了PHP中Illuminate\Log\Writer::useSyslog方法的典型用法代码示例。如果您正苦于以下问题:PHP Writer::useSyslog方法的具体用法?PHP Writer::useSyslog怎么用?PHP Writer::useSyslog使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Illuminate\Log\Writer
的用法示例。
在下文中一共展示了Writer::useSyslog方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: useSyslog
/**
* Register a Syslog handler.
*
* @param string $name
* @param string $level
* @return \Psr\Log\LoggerInterface
* @static
*/
public static function useSyslog($name = 'laravel', $level = 'debug')
{
return \Illuminate\Log\Writer::useSyslog($name, $level);
}
示例2: configureSyslogHandler
/**
* Configure the Monolog handlers for the application.
*
* @param \Illuminate\Contracts\Foundation\Application $app
* @param \Illuminate\Log\Writer $log
* @return void
*/
protected function configureSyslogHandler(Application $app, Writer $log)
{
$log->useSyslog('laravel');
}
示例3: configureSyslogHandler
/**
* OVERRIDE PARENT CLASS
* Configure the Monolog handlers for the application.
*
* @param \Illuminate\Contracts\Foundation\Application $app
* @param \Illuminate\Log\Writer $log
* @return void
*/
protected function configureSyslogHandler(Application $app, Writer $log)
{
// META: This piece raises lint warning:
// "Avoid unused parameters such as '$app'"
// But $app is not needed in this case and the method signature
// still respects the overrided method signature.
$log->useSyslog(env('SYSLOG_APPNAME', 'laravel'));
}
示例4: configureSyslogHandler
/**
* @param \Illuminate\Contracts\Foundation\Application|\Notadd\Foundation\Application $app
* @param \Illuminate\Log\Writer $log
*
* @return void
*/
protected function configureSyslogHandler(Application $app, Writer $log)
{
$log->useSyslog('laravel', $app->make('config')->get('app.log_level', 'debug'));
}
示例5: configureSyslogHandler
/**
* Configure the Monolog handlers for the application.
*
* @param \Illuminate\Log\Writer $log
* @return void
*/
protected function configureSyslogHandler(Writer $log)
{
$log->useSyslog('laravel', $this->logLevel());
}