首页>开发手册>Symfony>Logging Configuration Reference (MonologBundle)
Symfony 手册目录展开/收起

Symfony 7.4 LTS

Logging Configuration Reference (MonologBundle)

本文目录展开

官方英文资料(未自动翻译);本文按官方对应版本整理,保留说明和代码。站内处理包括移除站点导航、还原代码格式及调整链接。

The MonologBundle integrates the Monolog logging library in Symfony applications. All these options are configured under the monolog key in your application configuration.

# displays the default config values defined by Symfony
$ php bin/console config:dump-reference monolog

# displays the actual config values used by your application
$ php bin/console debug:config monolog

Note

When using XML, you must use the http://symfony.com/schema/dic/monolog namespace and the related XSD schema is available at: https://symfony.com/schema/dic/monolog/monolog-1.0.xsd

Tip

For a full list of handler types and related configuration options, see Monolog Configuration.

Note

When the profiler is enabled, a handler is added to store the logs' messages in the profiler. The profiler uses the name "debug" so it is reserved and cannot be used in the configuration.

This work, including the code samples, is licensed under a Creative Commons BY-SA 3.0 license.
TOC
Version

来源与许可

Symfony documentation contributors。本资料采用 CC BY-SA 3.0;本页为官方资料的站内整理版本,并非框架官方网站。 许可说明

Symfony 官方文档 · 原文来源 · 打开在线代码运行