{"repo":"yiisoft/log","free":true,"listed":false,"github":"https://github.com/yiisoft/log","clone":"git clone https://github.com/yiisoft/log.git","description":"PSR-3 compatible logger","language":"PHP","stars":43,"topics":["psr-3","logger","log","logging","yii3","hacktoberfest"],"license":"BSD-3-Clause","category":"analytics","readme_excerpt":"Yii Logging Library This package provides a PSR-3 compatible logging library. It is used extensively in the Yii Framework but it can also be used as a separate package. The logger sends or passes messages to multiple targets. Each target may filter these messages according to their severity level, and category, and then export them to some medium such as a file, an email or a syslog. Requirements - PHP 8.0 or higher. Installation The package can be installed with Composer: General usage Creating a logger: Writing logs: PSR-3 Message Placeholders The logger is PSR-3 compatible and supports message placeholders with additional enhancements. Placeholders in the message string are replaced with values from the context array: Placeholder names must be enclosed in curly braces {placeholder} and correspond to keys in the context array. Nested Context Values As an enhancement beyond the PSR-3 specification, the logger supports accessing nested array values using dot notation: Supported Data Types Placeholders can handle various data types: - Strings and numbers : Rendered as-is - null : Rendered as an empty string - Stringable objects : Converted using toString() - Arrays and objects : Rendered as formatted strings using VarDumper Context Data Preservation The context array is preserved in the log message and can be used by log targets for filtering, formatting, or exporting. This allows you to pass structured data alongside human-readable messages: Message Flushing and Exporting Log","default_branch":null,"files":null,"tree":[],"storefront":"/r/yiisoft","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/yiisoft/log/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}