Monolog is quite easy to setup and you only have to point it at an action and have it log away.
The library includes many handlers, log formatters, and various log processors.
Documentation is included with the download package.
Log levels:
Debug
Info
Notice
Warning
Error
Critical
Alert
Emergency
Handlers for:
Graylog2 servers
Cube servers
ElasticSearch servers
Sentry installations
NewRelic accounts
Loggly accounts
Rollbar accounts
LogEntries accounts
Syslogd
Swift Mailer
PHP mail() function
MongoDB
Redis
Apache CouchDB
Amazon DynamoDB
ChromePHP library
FirePHP library
PHP streams
AMQP streams
TCP sockets
What is new in this release:
- Added PHPConsoleHandler to send record to Chrome's PHP Console extension and library
- Added support for objects implementing __toString in the NormalizerFormatter
- Added support for HipChat's v2 API in HipChatHandler
- Added Logger::setTimezone() to initialize the timezone monolog should use in case date.timezone isn't correct for your app
- Added an option to send formatted message instead of the raw record on PushoverHandler via ->useFormattedMessage(true)
- Fixed curl errors being silently suppressed
What is new in version 1.17.1:
- Added PHPConsoleHandler to send record to Chrome's PHP Console extension and library
- Added support for objects implementing __toString in the NormalizerFormatter
- Added support for HipChat's v2 API in HipChatHandler
- Added Logger::setTimezone() to initialize the timezone monolog should use in case date.timezone isn't correct for your app
- Added an option to send formatted message instead of the raw record on PushoverHandler via ->useFormattedMessage(true)
- Fixed curl errors being silently suppressed
What is new in version 1.13.1:
- Added Registry::hasLogger to check for the presence of a logger instance
- Added context.user support to RavenHandler
- Added HipChat API v2 support in the HipChatHandler
- Added NativeMailerHandler::addParameter to pass params to the mail() process
- Added context data to SlackHandler when $includeContextAndExtra is true
- Added ability to customize the Swift_Message per-email in SwiftMailerHandler
- Fixed SwiftMailerHandler to lazily create message instances if a callback is provided
- Fixed serialization of INF and NaN values in Normalizer and LineFormatter
What is new in version 1.12.0:
- Added:
- WhatFailureGroupHandler to suppress any exception coming from the wrapped handlers and avoid chain failures if a logging service fails
- MandrillHandler to send emails via the Mandrillapp.com API
- SlackHandler to log records to a Slack.com account
- FleepHookHandler to log records to a Fleep.io account
- LogglyHandler::addTag to allow adding tags to an existing handler
- $ignoreEmptyContextAndExtra to LineFormatter to avoid empty [] at the end
- $useLocking to StreamHandler and RotatingFileHandler to enable flock() while writing
- Support for PhpAmqpLib in the AmqpHandler
- FingersCrossedHandler::clear and BufferHandler::clear to reset them between batches in long running jobs
- Support for adding extra fields from $_SERVER in the WebProcessor
- Fixed:
- Support for non-string values in PrsLogMessageProcessor
- SwiftMailer messages being sent with the wrong date in long running scripts
- Minor PHP 5.6 compatibility issues
- BufferHandler::close being called twice
What is new in version 1.10.0:
- Added Logger::getHandlers() and Logger::getProcessors() methods
- Added $passthruLevel argument to FingersCrossedHandler to let it always pass some records through even if the trigger level is not reached
- Added support for extra data in NewRelicHandler
- Added $expandNewlines flag to the ErrorLogHandler to create multiple log entries when a message has multiple lines
What is new in version 1.9.0:
- Added LogEntriesHandler to send logs to a LogEntries account
- Added $filePermissions to tweak file mode on StreamHandler and RotatingFileHandler
- Added $useFormatting flag to MemoryProcessor to make it send raw data in bytes
- Added support for table formatting in FirePHPHandler via the table context key
- Added a TagProcessor to add tags to records, and support for tags in RavenHandler
- Added $appendNewline flag to the JsonFormatter to enable using it when logging to files
- Added sound support to the PushoverHandler
- Fixed multi-threading support in StreamHandler
- Fixed empty headers issue when ChromePHPHandler received no records
- Fixed default format of the ErrorLogHandler
What is new in version 1.8.0:
- Added BrowserConsoleHandler to send logs to any browser's console via console.log() injection in the output
- Added FilterHandler to filter records and only allow those of a given list of levels through to the wrapped handler
- Added FlowdockHandler to send logs to a Flowdock account
- Added RollbarHandler to send logs to a Rollbar account
- Added HtmlFormatter to send prettier log emails with colors for each log level
- Added GitProcessor to add the current branch/commit to extra record data
- Added a Monolog\Registry class to allow easier global access to pre-configured loggers
- Added support for the new official graylog2/gelf-php lib for GelfHandler, upgrade if you can by replacing the mlehner/gelf-php requirement
- Added support for HHVM
- Added support for Loggly batch uploads
- Added support for tweaking the content type and encoding in NativeMailerHandler
- Added $skipClassesPartials to tweak the ignored classes in the IntrospectionProcessor
- Fixed batch request support in GelfHandler
What is new in version 1.7.0:
- Added $appName to NewRelicHandler
- Added configuration of Pushover notification retries/expiry
- Added $maxColumnWidth to NativeMailerHandler to change the 70 chars default
- Added chainability to most setters for all handlers
- Fixed RavenHandler batch processing so it takes the message from the record with highest priority
- Fixed HipChatHandler batch processing so it sends all messages at once
- Fixed issues with eAccelerator
- Fixed and improved many small things
- Added SyslogUdpHandler to send logs to a remote syslogd server
- Added LogglyHandler to send logs to a Loggly account
- Added $level to IntrospectionProcessor so it only adds backtraces when needed
- Added $version to LogstashFormatter to allow using the new v1 Logstash format
What is new in version 1.5.0:
- Added UidProcessor to inject a unique identifier to all log records of one request/run
- Added support for previous exceptions in the LineFormatter exception serialization
- Added Monolog\Logger::getLevels() to get all available levels
- Fixed ChromePHPHandler so it avoids sending headers larger than Chrome can handle
What is new in version 1.4.1:
- Fixed exception formatting in the LineFormatter to be more minimalistic
- Fixed RavenHandler's handling of context/extra data, requires Raven client >0.1.0
- Fixed log rotation in RotatingFileHandler to work with long running scripts spanning multiple days
- Fixed WebProcessor array access so it checks for data presence
- Fixed Buffer, Group and FingersCrossed handlers to make use of their processors
What is new in version 1.4.0:
- Added RedisHandler to log to Redis via the Predis library or the phpredis extension.
- Added ZendMonitorHandler to log to the Zend Server monitor.
- Added the possibility to pass arrays of handlers and processors directly in the Logger constructor.
- Added `$useSSL` option to the PushoverHandler which is enabled by default.
- Fixed ChromePHPHandler and FirePHPHandler issue when multiple instances are used simultaneously.
- Fixed header injection capability in the NativeMailHandler.
What is new in version 1.3.1:
- Fixed LogstashFormatter to be usable with stream handlers.
Requirements:
- PHP 5.3 or higher
Comments not found