All Projects → sergeymakinen → Yii2 Telegram Log

sergeymakinen / Yii2 Telegram Log

Licence: mit
Telegram log target for Yii 2

Projects that are alternatives of or similar to Yii2 Telegram Log

Yii2 Slack Log
Pretty Slack log target for Yii 2
Stars: ✭ 24 (+0%)
Mutual labels:  yii2, yii2-extension, notifications, logging, log, logging-library, notification
Yii2 Psr Log Target
Yii 2.0 log target that is able to write messages to PSR-3 compatible logger
Stars: ✭ 58 (+141.67%)
Mutual labels:  yii2, yii2-extension, logging, log
Telegram Bot Github
Allows to you receive GitHub notifications right in the Telegram
Stars: ✭ 103 (+329.17%)
Mutual labels:  telegram, notifications, notification
Daiquiri
Python library to easily setup basic logging functionality
Stars: ✭ 308 (+1183.33%)
Mutual labels:  logging, log, logging-library
Quicklogger
Library for logging on files, console, memory, email, rest, eventlog, syslog, slack, telegram, redis, logstash, elasticsearch, influxdb, graylog, Sentry, Twilio, ide debug messages and throw events for Delphi/Firemonkey/freepascal/.NET (Windows/Linux/OSX/IOS/Android).
Stars: ✭ 137 (+470.83%)
Mutual labels:  telegram, logging, log
Cocoadebug
iOS Debugging Tool 🚀
Stars: ✭ 3,769 (+15604.17%)
Mutual labels:  logging, log, logging-library
Yii2 Selectize
selectize.js wrapper for yii2.
Stars: ✭ 18 (-25%)
Mutual labels:  yii2, yii2-extension
Fern
Simple, efficient logging for Rust
Stars: ✭ 524 (+2083.33%)
Mutual labels:  logging, logging-library
Nlog
NLog - Advanced and Structured Logging for Various .NET Platforms
Stars: ✭ 5,296 (+21966.67%)
Mutual labels:  logging, logging-library
Zabbix In Telegram
Zabbix Notifications with graphs in Telegram
Stars: ✭ 710 (+2858.33%)
Mutual labels:  telegram, notifications
Izumi
Productivity-oriented collection of lightweight fancy stuff for Scala toolchain
Stars: ✭ 423 (+1662.5%)
Mutual labels:  logging, logging-library
Screenlog.js
Bring console.log on the screen
Stars: ✭ 591 (+2362.5%)
Mutual labels:  logging, logging-library
Mex Vocabulary
MEX Vocabulary: a lightweight machine learning interchange format
Stars: ✭ 19 (-20.83%)
Mutual labels:  logging, logging-library
Log4rs
A highly configurable logging framework for Rust
Stars: ✭ 483 (+1912.5%)
Mutual labels:  logging, log
Monitor Table Change With Sqltabledependency
Get SQL Server notification on record table change
Stars: ✭ 459 (+1812.5%)
Mutual labels:  notifications, notification
React Log
React for the Console
Stars: ✭ 553 (+2204.17%)
Mutual labels:  logging, log
Logstash Logger
Ruby logger that writes logstash events
Stars: ✭ 442 (+1741.67%)
Mutual labels:  logging, logging-library
Dozzle
Realtime log viewer for docker containers.
Stars: ✭ 684 (+2750%)
Mutual labels:  logging, log
Notie
🔔 a clean and simple notification, input, and selection suite for javascript, with no dependencies
Stars: ✭ 6,170 (+25608.33%)
Mutual labels:  notifications, notification
Notify
A dead simple Go library for sending notifications to various messaging services.
Stars: ✭ 727 (+2929.17%)
Mutual labels:  telegram, notifications

Telegram log target for Yii 2

Telegram log target for Yii 2.

Screenshot

Code Quality Build Status Code Coverage SensioLabsInsight

Packagist Version Total Downloads Software License

Installation

The preferred way to install this extension is through composer.

Either run

composer require "sergeymakinen/yii2-telegram-log:^2.0"

or add

"sergeymakinen/yii2-telegram-log": "^2.0"

to the require section of your composer.json file.

Usage

First create a new bot and obtain its token. It should look like 123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11.

You will also need a chat ID to send logs to. You can use the @get_id_bot bot to obtain it. It should look like 123456789.

Then set the following Yii 2 configuration parameters:

'components' => [
    'log' => [
        'targets' => [
            [
                'class' => 'sergeymakinen\yii\telegramlog\Target',
                'token' => '123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11',
                'chatId' => 123456789,
            ],
        ],
    ],
],

Configuration

By default yii\log\Logger error levels are mapped to emojis (you can tweak them in the levelEmojis property):

Error level Emoji
Logger::LEVEL_ERROR ☠️
Logger::LEVEL_WARNING ⚠️
Logger::LEVEL_INFO ℹ️
Logger::LEVEL_TRACE 📝

It's also possible to disable notifications - entirely or per logger level (look at the enableNotification property), for example:

public $enableNotification = [
    Logger::LEVEL_ERROR => true,
    Logger::LEVEL_WARNING => false,
    Logger::LEVEL_INFO => false,
];

This will disable notifications for warning and info level messages and enable them for other levels (honestly, you can omit the LEVEL_ERROR definition here as it's true by default).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].