2017 © Pedro Peláez
 

yii2-extension yii2-pushover

A Yii2 PushOver log target and pushover messaging component

image

consynki/yii2-pushover

A Yii2 PushOver log target and pushover messaging component

  • Thursday, January 28, 2016
  • by levi-putna
  • Repository
  • 2 Watchers
  • 0 Stars
  • 2,796 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 18 % Grown

The README.md

Yii2 PushOver

Yii2 Pushover provides a component and log targets to send Pushover (https://pushover.net/) messages., (*1)

Install

composer require consynki/yii2-pushover "*"

Or add "consynki/yii2-pushover": "*" to your composer.json file and run composer update, (*2)

In config file:, (*3)

'components' => [
    'pushover' => [
        'class' => 'consynki\yii\pushover\Pushover',
        'user_key' => '<your-user-key>',
        'api_key' => '<your-api-key>',

    ],
    'log' => [
        'targets' => [
            [
                'class' => 'consynki\yii\pushover\Target',
                'levels' => ['error'],
                'except' => ['yii\web\HttpException:404'],
            ]
        ],
    ],
]

You only need to confider the log target if you wish to send messages to pushover via the logging system. If you wish you can manual send messages directly via the component., (*4)

The log trace will support any additional standard Yii2 log target params., (*5)

It is recommended to limit the number of messages that are sent via pushover to critical issues. The best option is to only send errors, in addition you can ignore particular common error types events 404, (*6)

If application doesn't have pushover component, no errors will try to be logged to pushover. This is useful for development environments, for example., (*7)

Usage

Pushover Component

If you would like to send a message without using the log target you can simply use the component directly, (*8)

Yii::$app->pushover->send($message, $title, $sound);

Log Target

Exceptions and PHP errors are caught without effort. Standart Yii::(error|warning|info|trace) logging works as usual, but you also can use the following format:, (*9)

Yii::error('Error Message', 'Error Category')

The Versions

28/01 2016

dev-master

9999999-dev

A Yii2 PushOver log target and pushover messaging component

  Sources   Download

MIT

The Requires

 

by Levi Putna

log yii2 pushover

28/01 2016

1.1.0

1.1.0.0

A Yii2 PushOver log target and pushover messaging component

  Sources   Download

MIT

The Requires

 

by Levi Putna

log yii2 pushover

12/01 2016

1.0.0

1.0.0.0

A Yii2 PushOver log target and pushover messaging component

  Sources   Download

MIT

The Requires

 

by Levi Putna

log yii2 pushover