awallef/cakephp-cw-log

There is no license information available for the latest version (4.0.0.0) of this package.

CakePHP log in aws cloudwatch

Installs: 26 550

Dependents: 0

Suggesters: 0

Security: 0

Stars: 3

Watchers: 2

Forks: 1

Open Issues: 0

Type:cakephp-plugin

4.0.0.0 2020-01-27 08:34 UTC

This package is auto-updated.

Last update: 2024-03-27 17:33:27 UTC


README

This plugin allows you log your cakephp app in aws cloudwatch

Installation

You can install this plugin into your CakePHP application using composer.

The recommended way to install composer packages is:

composer require awallef/cakephp-cw-log

Log settings

Configure the engine in app.php like follow:

...
'Log' => [
    'debug' => [
		'className' => 'Awallef\CWL\Log\Engine\CloudwatchLog',
		'levels' => ['notice', 'info', 'debug'],

		// Cloudwatch
    'groupName' => 'ec2-instance-x',
    'streamName' => 'my-php-app-log-test',
    'retentionDays' => '14', // days...

    // aws
    'aws' => [
      'region' => 'eu-central-1',
      'version' => 'latest',
      'credentials' => [
        'key' => 'your AWS key',
        'secret' => 'your AWS secret',
      ]
    ]
    ],
    'error' => [
		'className' => 'Awallef\CWL\Log\Engine\CloudwatchLog',
		'levels' => ['warning', 'error', 'critical', 'alert', 'emergency'],

		// Cloudwatch
    'groupName' => 'ec2-instance-x',
    'streamName' => 'my-php-app-log-test',
    'retentionDays' => '14', // days...

    // aws
    'aws' => [
      'region' => 'eu-central-1',
      'version' => 'latest',
      'credentials' => [
        'key' => 'your AWS key',
        'secret' => 'your AWS secret',
      ]
    ]
    ],
],
...

more to come, like errors types as tags....