Register a daily file log handler.

@param  string  $path
@param  int     $days
@param  string  $level
@return void
323909
public function useDailyFiles($path, $days = 0, $level = 'debug')
	{
		$level = $this->parseLevel($level);

		$this->monolog->pushHandler(new RotatingFileHandler($path, $days, $level));
	}
430650
public static function logToFile($message, $level)
    {
        if ($level > self::$config['level']) {
            return;
        }
        
        $filename = self::$config['filename'];
        $template = self::$config['message_template'];
        $tags = array(
            '%date%' => @date('Y-m-d H:i:s'), 
            '%level%' => $level,
            '%message%' => $message
        );
        
        $file = fopen($filename, 'a');
        fwrite($file, str_replace(array_keys($tags), array_values($tags), $template) . "\n");
        fclose($file);
        $file = null;
    }
158151
public function log($msg, array $data = [], $level = Logger::INFO): void
    {
        $this->mgr->log($msg, $data, $level);
    }
636669
public function log($level, $message, array $context = array())
    {
        $message = $this->psrPlaceholder->process([
            "message" => $message,
            "context" => $context,
        ])["message"];
        file_put_contents($this->receiverPath, $message, FILE_APPEND);
    }
48620
private static function log(string $level, string $message, array $context = [])
    {
        if (static::$logger !== null) {
            static::$logger->$level($message, $context);
        }
    }
107201
public function log($level, $message, array $context = []): void
    {
        $this->entries[] = [$level, $message, $context];
    }
847166
public function log($level, $message, array $context = array())
    {
        if (in_array($level, $this->levels)) {
            file_put_contents(
                $this->logFile, $message . PHP_EOL, FILE_APPEND
            );
        }
    }
1165539
protected function log($message, $level=GearmanManager::LOG_LEVEL_INFO) {

        static $init = false;

        if ($level > $this->verbose) return;

        if ($this->log_syslog) {
            $this->syslog($message, $level);
            return;
        }

        if (!$init) {
            $init = true;

            if ($this->log_file_handle) {
                fwrite($this->log_file_handle, "Date                         PID   Type   Message\n");
            } else {
                echo "PID   Type   Message\n";
            }

        }

        $label = "";

        switch ($level) {
            case GearmanManager::LOG_LEVEL_INFO;
                $label = "INFO  ";
                break;
            case GearmanManager::LOG_LEVEL_PROC_INFO:
                $label = "PROC  ";
                break;
            case GearmanManager::LOG_LEVEL_WORKER_INFO:
                $label = "WORKER";
                break;
            case GearmanManager::LOG_LEVEL_DEBUG:
                $label = "DEBUG ";
                break;
            case GearmanManager::LOG_LEVEL_CRAZY:
                $label = "CRAZY ";
                break;
        }


        $log_pid = str_pad($this->pid, 5, " ", STR_PAD_LEFT);

        if ($this->log_file_handle) {
            list($ts, $ms) = explode(".", sprintf("%f", microtime(true)));
            $ds = date("Y-m-d H:i:s").".".str_pad($ms, 6, 0);
            $prefix = "[$ds] $log_pid $label";
            fwrite($this->log_file_handle, $prefix." ".str_replace("\n", "\n$prefix ", trim($message))."\n");
        } else {
            $prefix = "$log_pid $label";
            echo $prefix." ".str_replace("\n", "\n$prefix ", trim($message))."\n";
        }

    }
1018628
public function useSyslog($name = 'laravel', $level = 'debug')
    {
        $this->monolog->pushHandler(new SyslogHandler($name, LOG_USER, $level));
    }
131770
public function addStream($path, $level, $bubble = true)
    {
        $handler = new StreamHandler(
            $path,
            $this->parseLevel($level),
            $bubble
        );
        $handler->setFormatter($this->getDefaultFormatter());

        $this->logger
            ->pushHandler($handler)
        ;

        return $this;
    }
1227579
public function createDefaultStreamLogger($name, $path, $level = Logger::DEBUG)
    {
        $logger = new Logger($name);
        $handler = new \Monolog\Handler\StreamHandler($path, $level);
        $logger->pushHandler($handler);
        $this->loggers[$name] = $logger;

        return $this;
    }
411155
public function log($level, $message, array $context = array())
    {
        if (!$this->fileName) {
            return;
        }
        file_put_contents($this->fileName, '['.$level.'] - '.$message.' | '.serialize($context));
    }
335443
public function log($msg, $level = Project::MSG_INFO)
    {
        if ($this->project !== null) {
            $this->project->log("[filter:" . get_class($this) . "] " . $msg, $level);
        }
    }
1281260
private static function log(string $message, int $level) {
        \Logger::configure(self::getConfiguration());
        $logger = \Logger::getRootLogger();
        $logger->setLevel(self::getLoggerLevel());

        switch ($level) {
            case Logger::DEBUG:
                $logger->debug($message);
                break;
            case Logger::INFO:
                $logger->info($message);
                break;
            case Logger::WARN:
                $logger->warn($message);
                break;
            case Logger::ERROR:
                $logger->error($message);
                break;
            case Logger::FATAL:
                $logger->fatal($message);
                break;
            case Logger::TRACE:
                $logger->trace($message);
                break;
            default:
        }
    }
1140768
public function log($message, $level = LogLevel::INFO, $context = array())
    {
        $this->buildLogger->log($message, $level, $context);
    }
508811
private function _log($level, $message)
    {
        $level_config = Config::get("log_level");
        if (!$level_config) {
            $level_config = "DEBUG";
        }

        $level_val = self::$levels[$level];
        $level_config = self::$levels[$level_config];

        if ($level_config > $level_val) {
            return ;
        }

        wlog($level, $message);
    }
1187151
public function log(string $level, string $message, array $context = array(), $filename = null)
    {
        $this->setLogger($message, $context = [], $filename);
    }