2017 © Pedro Peláez
 

library log

CakePHP logging library with support for multiple different streams

image

cakephp/log

CakePHP logging library with support for multiple different streams

  • Tuesday, April 24, 2018
  • by cakephp
  • Repository
  • 29 Watchers
  • 6 Stars
  • 22,426 Installations
  • PHP
  • 5 Dependents
  • 2 Suggesters
  • 4 Forks
  • 0 Open issues
  • 100 Versions
  • 7 % Grown

The README.md

Total Downloads License, (*1)

CakePHP Logging Library

The Log library provides a Log service locator for interfacing with multiple logging backends using a simple interface. With the Log class it is possible to send a single message to multiple logging backends at the same time or just a subset of them based on the log level or context., (*2)

By default, you can use Files or Syslog as logging backends, but you can use any object implementing Psr\Log\LoggerInterface as an engine for the Log class., (*3)

Usage

You can define as many or as few loggers as your application needs. Loggers should be configured using Cake\Core\Log. An example would be:, (*4)

use Cake\Cache\Cache;

use Cake\Log\Log;

// Short classname
Log::config('local', [
    'className' => 'FileLog',
    'levels' => ['notice', 'info', 'debug'],
    'file' => '/path/to/file.log',
]);

// Fully namespaced name.
Log::config('production', [
    'className' => \Cake\Log\Engine\SyslogLog::class,
    'levels' => ['warning', 'error', 'critical', 'alert', 'emergency'],
]);

It is also possible to create loggers by providing a closure., (*5)

Log::config('special', function () {
    // Return any PSR-3 compatible logger
    return new MyPSR3CompatibleLogger();
});

Or by injecting an instance directly:, (*6)

Log::config('special', new MyPSR3CompatibleLogger());

You can then use the Log class to pass messages to the logging backends:, (*7)

Log::write('debug', 'Something did not work');

Only the logging engines subscribed to the log level you are writing to will get the message passed. In the example above, only the 'local' engine will get the log message., (*8)

Filtering messages with scopes

The Log library supports another level of message filtering. By using scopes, you can limit the logging engines that receive a particular message., (*9)

// Configure /logs/payments.log to receive all levels, but only
// those with `payments` scope.
Log::config('payments', [
    'className' => 'FileLog',
    'levels' => ['error', 'info', 'warning'],
    'scopes' => ['payments'],
    'file' => '/logs/payments.log',
]);

Log::warning('this gets written only to payments.log', ['scope' => ['payments']]);

Documentation

Please make sure you check the official documentation, (*10)

The Versions

24/04 2018

dev-master

9999999-dev https://cakephp.org

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

log cakephp logging streams

24/04 2018

3.6.3

3.6.3.0 https://cakephp.org

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

log cakephp logging streams

24/04 2018

3.6.4

3.6.4.0 https://cakephp.org

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

log cakephp logging streams

24/04 2018

3.6.5

3.6.5.0 https://cakephp.org

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

log cakephp logging streams

24/04 2018

3.6.6

3.6.6.0 https://cakephp.org

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

log cakephp logging streams

24/04 2018

3.6.7

3.6.7.0 https://cakephp.org

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

log cakephp logging streams

24/04 2018

3.6.8

3.6.8.0 https://cakephp.org

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

log cakephp logging streams

24/04 2018

3.6.9

3.6.9.0 https://cakephp.org

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

log cakephp logging streams

18/03 2018

dev-3.next

dev-3.next https://cakephp.org

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

log cakephp logging streams

18/03 2018

3.6.0-RC1

3.6.0.0-RC1 https://cakephp.org

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

log cakephp logging streams

18/03 2018

3.6.0-RC2

3.6.0.0-RC2 https://cakephp.org

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

log cakephp logging streams

18/03 2018

3.6.1

3.6.1.0 https://cakephp.org

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

log cakephp logging streams

18/03 2018

3.6.2

3.6.2.0 https://cakephp.org

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

log cakephp logging streams

18/03 2018

3.6.0

3.6.0.0 https://cakephp.org

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

log cakephp logging streams

19/11 2017

3.6.0-beta1

3.6.0.0-beta1 https://cakephp.org

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

log cakephp logging streams

19/11 2017

3.6.0-beta2

3.6.0.0-beta2 https://cakephp.org

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

log cakephp logging streams

19/11 2017

3.6.0-beta3

3.6.0.0-beta3 https://cakephp.org

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

log cakephp logging streams

25/09 2017

3.5.3

3.5.3.0 https://cakephp.org

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

log cakephp logging streams

25/09 2017

3.5.4

3.5.4.0 https://cakephp.org

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

log cakephp logging streams

25/09 2017

3.5.5

3.5.5.0 https://cakephp.org

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

log cakephp logging streams

25/09 2017

3.5.6

3.5.6.0 https://cakephp.org

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

log cakephp logging streams

25/09 2017

3.5.7

3.5.7.0 https://cakephp.org

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

log cakephp logging streams

25/09 2017

3.5.8

3.5.8.0 https://cakephp.org

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

log cakephp logging streams

25/09 2017

3.5.9

3.5.9.0 https://cakephp.org

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

log cakephp logging streams

25/09 2017

3.5.10

3.5.10.0 https://cakephp.org

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

log cakephp logging streams

25/09 2017

3.5.11

3.5.11.0 https://cakephp.org

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

log cakephp logging streams

25/09 2017

3.5.12

3.5.12.0 https://cakephp.org

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

log cakephp logging streams

25/09 2017

3.5.13

3.5.13.0 https://cakephp.org

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

log cakephp logging streams

25/09 2017

3.5.14

3.5.14.0 https://cakephp.org

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

log cakephp logging streams

25/09 2017

3.5.15

3.5.15.0 https://cakephp.org

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

log cakephp logging streams

25/09 2017

3.5.x-dev

3.5.9999999.9999999-dev https://cakephp.org

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

log cakephp logging streams

25/09 2017

3.5.17

3.5.17.0 https://cakephp.org

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

log cakephp logging streams

15/06 2017

3.5.0

3.5.0.0 https://cakephp.org

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

log cakephp logging streams

15/06 2017

3.5.0-RC1

3.5.0.0-RC1 https://cakephp.org

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

log cakephp logging streams

15/06 2017

3.5.0-RC2

3.5.0.0-RC2 https://cakephp.org

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

log cakephp logging streams

15/06 2017

3.5.1

3.5.1.0 https://cakephp.org

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

log cakephp logging streams

15/06 2017

3.5.2

3.5.2.0 https://cakephp.org

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

log cakephp logging streams

15/06 2017

3.4.10

3.4.10.0 https://cakephp.org

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

log cakephp logging streams

15/06 2017

3.4.11

3.4.11.0 https://cakephp.org

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

log cakephp logging streams

15/06 2017

3.4.12

3.4.12.0 https://cakephp.org

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

log cakephp logging streams

15/06 2017

3.4.13

3.4.13.0 https://cakephp.org

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

log cakephp logging streams

15/06 2017

3.4.8

3.4.8.0 https://cakephp.org

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

log cakephp logging streams

15/06 2017

3.4.9

3.4.9.0 https://cakephp.org

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

log cakephp logging streams

15/06 2017

3.4.x-dev

3.4.9999999.9999999-dev https://cakephp.org

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

log cakephp logging streams

15/06 2017

3.4.14

3.4.14.0 https://cakephp.org

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

log cakephp logging streams

17/05 2017

3.4.7

3.4.7.0

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

17/04 2017

3.4.6

3.4.6.0

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

14/03 2017

3.4.4

3.4.4.0

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

14/03 2017

3.4.5

3.4.5.0

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

16/02 2017

3.4.1

3.4.1.0

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

16/02 2017

3.4.2

3.4.2.0

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

16/02 2017

3.4.3

3.4.3.0

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

01/02 2017

3.4.0

3.4.0.0

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

01/02 2017

3.4.0-RC4

3.4.0.0-RC4

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

22/12 2016

3.4.0-beta1

3.4.0.0-beta1

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

22/12 2016

3.4.0-beta2

3.4.0.0-beta2

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

22/12 2016

3.4.0-beta3

3.4.0.0-beta3

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

22/12 2016

3.4.0-beta4

3.4.0.0-beta4

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

22/12 2016

3.4.0-RC1

3.4.0.0-RC1

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

22/12 2016

3.4.0-RC2

3.4.0.0-RC2

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

22/12 2016

3.4.0-RC3

3.4.0.0-RC3

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

01/12 2016

3.3.10

3.3.10.0

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

01/12 2016

3.3.11

3.3.11.0

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

01/12 2016

3.3.12

3.3.12.0

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

01/12 2016

3.3.13

3.3.13.0

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

01/12 2016

3.3.14

3.3.14.0

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

01/12 2016

3.3.15

3.3.15.0

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

01/12 2016

3.3.16

3.3.16.0

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

10/08 2016

3.2.14

3.2.14.0

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

10/08 2016

3.3.0

3.3.0.0

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

10/08 2016

3.3.1

3.3.1.0

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

10/08 2016

3.3.2

3.3.2.0

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

10/08 2016

3.3.3

3.3.3.0

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

10/08 2016

3.3.4

3.3.4.0

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

10/08 2016

3.3.5

3.3.5.0

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

10/08 2016

3.3.6

3.3.6.0

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

10/08 2016

3.3.7

3.3.7.0

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

10/08 2016

3.3.8

3.3.8.0

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

10/08 2016

3.3.9

3.3.9.0

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

13/07 2016

3.2.13

3.2.13.0

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

13/07 2016

3.3.0-beta2

3.3.0.0-beta2

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

13/07 2016

3.3.0-beta3

3.3.0.0-beta3

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

13/07 2016

3.3.0-RC1

3.3.0.0-RC1

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

21/02 2016

3.2.10

3.2.10.0

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

21/02 2016

3.2.11

3.2.11.0

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

21/02 2016

3.2.12

3.2.12.0

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

21/02 2016

3.2.3

3.2.3.0

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

21/02 2016

3.2.4

3.2.4.0

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

21/02 2016

3.2.5

3.2.5.0

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

21/02 2016

3.2.6

3.2.6.0

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

21/02 2016

3.2.7

3.2.7.0

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

21/02 2016

3.2.8

3.2.8.0

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

21/02 2016

3.2.9

3.2.9.0

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

21/02 2016

3.3.0-beta

3.3.0.0-beta

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

09/02 2016

3.2.2

3.2.2.0

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

28/01 2016

3.1.x-dev

3.1.9999999.9999999-dev

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

28/01 2016

dev-3-1

dev-3-1

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

28/01 2016

3.1.10

3.1.10.0

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

28/01 2016

3.1.13

3.1.13.0

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires

 

28/01 2016

3.1.9

3.1.9.0

CakePHP logging library with support for multiple different streams

  Sources   Download

MIT

The Requires