The main goal is to allow libraries to receive a Psr\Log\LoggerInterface object and write logs to it in a simple and universal way. The LoggerInterface exposes eight methods to write logs to the eight RFC 5424 levels (debug, info, notice, warning, error, critical, alert, emergency). Every method accepts a string as the message, or an object with a toString() method. Implementors MAY have special handling for the passed objects. If that is not the case, implementors MUST cast it to a string. The interfaces and classes described as well as relevant exception classes and a test suite to verify your implementation are provided as part of the psr/log package. Note that this is not a logger of its own. It is merely an interface that describes a logger. You can pick one of the implementations of the interface to get a logger. If you want to implement the interface, you can require this package and implement Psr\Log\LoggerInterface in your code.

Features

  • Every method accepts an array as context data
  • The array can contain anything
  • The LoggerInterface exposes eight methods to write logs to the eight RFC 5424 levels
  • Debug, info, notice, warning, error, critical, alert, and emergency
  • Holds all interfaces/classes/traits related to PSR-3

Project Samples

Project Activity

See All Activity >

Categories

Logging

License

MIT License

Follow PSR Log

PSR Log Web Site

You Might Also Like
Our Free Plans just got better! | Auth0 by Okta Icon
Our Free Plans just got better! | Auth0 by Okta

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your secuirty. Auth0 now, thank yourself later.
Try free now
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of PSR Log!

Additional Project Details

Programming Language

PHP

Related Categories

PHP Logging Software

Registered

2021-06-16