PHPackages                             ride/lib-log - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. ride/lib-log

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

ride/lib-log
============

Log library of the Ride framework

1.2.0(2y ago)034.8k↓43.2%20MITPHP

Since Sep 22Pushed 2y ago7 watchersCompare

[ Source](https://github.com/all-ride/ride-lib-log)[ Packagist](https://packagist.org/packages/ride/lib-log)[ RSS](/packages/ride-lib-log/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (16)Used By (20)

Ride: Log Library
=================

[](#ride-log-library)

Log library of the PHP Ride framework.

Logging is used to keep an history of events or to debug an application.

What's In This Library
----------------------

[](#whats-in-this-library)

### LogMessage

[](#logmessage)

A log message defines what's being done or what happened.

It consists a:

- **level**: error, warning, information or debug
- **title**: title of the message
- **description**: detailed information about the message
- **date**: date and time of the event
- **microtime**: microseconds in the application run
- **id**: id of the log session
- **source**: source library or module which logged the message
- **client**: Id of the client (eg. an IP address)

### LogSession

[](#logsession)

A *LogSession* is a collection of log messages which belong together. For example, all logged messages from handling the same HTTP request.

### Log

[](#log)

The log object is the facade to the library which offers an easy interface to log messages. It uses the observer pattern to dispatch those logged messages to the listeners of the log.

### LogListener

[](#loglistener)

A log listener performs the actual logging of the message. The most common thing to do is write a log message to a file. An implementation to do just that has been provided.

### BrowseableLogListener

[](#browseableloglistener)

The browseable log listener is an extension of the regular log listener. It adds functionality to retrieve and inspect log messages back from the log.

Code Sample
-----------

[](#code-sample)

Check this code sample to see the possibilities of this library:

```
