minhyung/monolog-synology

Monolog handler for Synology

Installs: 1

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/minhyung/monolog-synology

0.2.0 2025-09-17 04:42 UTC

This package is auto-updated.

Last update: 2025-12-17 05:14:18 UTC


README

A Monolog handler for sending log messages to Synology Chat via incoming webhooks.

Features

  • Send logs from your PHP application directly to Synology Chat
  • Custom formatter for structured JSON messages
  • Built on top of Monolog

Installation

Install via Composer:

composer require minhyung/monolog-synology

Usage

use Minhyung\Monolog\SynologyChatHandler;
use Monolog\Logger;

$webhookUrl = 'https://your-synology-chat-webhook-url';
$logger = new Logger('synology');
$handler = new SynologyChatHandler($webhookUrl);
$logger->pushHandler($handler);

$logger->info('This is a test message sent to Synology Chat!');

Handler Options

  • $url (string): Synology Chat incoming webhook URL (required)
  • $ignoreFailure (bool): If true, exceptions during sending will be ignored (default: false)
  • $level: Minimum logging level (default: Logger::DEBUG)
  • $bubble: Whether messages bubble up the stack (default: true)

Formatter

The handler uses a custom formatter (SynologyChatFormatter) that encodes log records as JSON strings for Synology Chat.

License

MIT License. See LICENSE for details.