如何在AWS中存储symfony4日志?

时间:2018-11-23 09:48:39

标签: php symfony4 monolog

在symfony生产模式下将日志写入AWS

# config/packages/prod/monolog.yaml
monolog:
    handlers:
        # this "file_log" key could be anything
        file_log:
            type: stream
            # log to var/log/(environment).log
            path: "%kernel.logs_dir%/%kernel.environment%.log"
            # log *all* messages (debug is lowest level)
            level: debug

        syslog_handler:
            type: syslog
            # log error-level messages and higher
            level: error

https://symfony.com/doc/current/logging.html

0 个答案:

没有答案