Download the PHP package adeira/monolog without Composer

On this page you can find all versions of the php package adeira/monolog. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package monolog

At this moment I don't have time, energy and money to maintain this project. But it's a shame so if you depend on this project and you want to become a sponsor or develop it further please don't hesitate to contact me. Otherwise, I am not able to guarantee bright future of this repo... :)

More awesome Monolog for Nette Framework

Build Status

This package is extending Kdyby\Monolog to make it more flexible, configurable and awesome.

Inspiration:

Installation

composer require adeira/monolog

And register DI extension in config.neon:

extensions:
    monolog: Adeira\Monolog\DI\MonologExtension

Default configuration

Package adeira/monolog brings a lot of formatters and processors by default. This means you can use them only by name. Here is the complete list of defaults:

formatters:
    chromePHP: Monolog\Formatter\ChromePHPFormatter
    fluentd: Monolog\Formatter\FluentdFormatter
    gelfMessage: Monolog\Formatter\GelfMessageFormatter
    html: Monolog\Formatter\HtmlFormatter
    json: Monolog\Formatter\JsonFormatter
    line: Monolog\Formatter\LineFormatter
    loggly: Monolog\Formatter\LogglyFormatter
    mongoDB: Monolog\Formatter\MongoDBFormatter
    normalizer: Monolog\Formatter\NormalizerFormatter
    dcalar: Monolog\Formatter\ScalarFormatter
    wildfire: Monolog\Formatter\WildfireFormatter

processors:
    git: Monolog\Processor\GitProcessor
    introspection: Monolog\Processor\IntrospectionProcessor
    memoryPeakUsage: Monolog\Processor\MemoryPeakUsageProcessor
    memoryUsage: Monolog\Processor\MemoryUsageProcessor
    processId: Monolog\Processor\ProcessIdProcessor
    psrLogMessage: Monolog\Processor\PsrLogMessageProcessor
    tag: Monolog\Processor\TagProcessor
    uid: Monolog\Processor\UidProcessor
    web: Monolog\Processor\WebProcessor

handlers:
    errorLog:
        class: Monolog\Handler\ErrorLogHandler

loggers:
    global:
        class: Kdyby\Monolog\Logger # including custom global handlers and processors

You DON'T have to copy paste this into your config file. This is just a quick reference so you can find what you want quickly.

Overriding configuration

Every formatter and processor uses default configuration if possible. If you want custom configuration, it's easy to override it like this:

monolog:
    processors:
        web: Monolog\Processor\WebProcessor(NULL, [
                ip: REMOTE_ADDR,
                userAgent: HTTP_USER_AGENT,
            ])

Changing global logger configuration and adding own loggers

As you already know - this package extends kdyby\monolog. And there is default global logger for whole application. You can configure it by using global name in loggers section. Another loggers will be registered independently (with name or anonymously):

monolog:
    handlers:
        slack:
            class: Adeira\Monolog\Handler\SlackHandler(
                %productionMode%,
                %slack.token%,
                %slack.channel%,
                %slack.username%,
                %slack.useAttachment%,
                %slack.iconEmoji%,
                %slack.level%,
                %slack.bubble%,
                %slack.useShortAttachment%,
                %slack.includeContextAndExtra%
            )
    loggers:
        global: # global logger from Kdyby (\Kdyby\Monolog\Logger)
            handlers: [slack]
            processors: [git, introspection, web]
        - class: Custom\Monolog\Loggers\UsersAuditLogger
          handlers: [database]

This way you can setup a lot of loggers with different configuration (handlers, processors, formatter). Your custom loggers are like services in DI container so you can use autowiring to get them. Nothing special. Remember, that it's good idea to extend these custom loggers from \Monolog\Logger or even better from \Kdyby\Monolog\Logger.

Using Kdyby configuration options

Package adeira/monolog is not playing with Kdyby configuration so you can use it if you want to without changes:

monolog:
    hookToTracy: yes
    registerFallback: yes
    usePriorityProcessor: yes

Awesome right? :)


All versions of monolog with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
kdyby/monolog Version ^1.2
monolog/monolog Version ^1.21
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package adeira/monolog contains the following files

Loading the files please wait ....