Download the PHP package raneomik/watchdog-bundle without Composer
On this page you can find all versions of the php package raneomik/watchdog-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download raneomik/watchdog-bundle
More information about raneomik/watchdog-bundle
Files in raneomik/watchdog-bundle
Package watchdog-bundle
Short Description This bundle provides a configurable watchdog for events to fire
License MIT
Informations about the package watchdog-bundle
WatchdogBundle
A widget bundle providing a watchdog which "woofs" if current time matches provided configuration.
Installation
composer require raneomik/watchdog-bundle
if not using symfony/flex, you need de register the bundle in your project :
Configuration
It can be configured as follows:
Watchdog service
This bundle provides the Raneomik\WatchdogBundle\Watchdog\WatchdogInterface
service that can be injected anywhere.
It has a isWoofTime
method returning true once configuration matches current date time.
If several ones are defined, they can be injected as follows (based on the example above) :
WatchdogHandlerInterface and WatchdogWoofCheckEvent
This bundle also provides the Raneomik\WatchdogBundle\Handler\WatchdogHandlerInterface
interface with processWoof(array $parameters = [])
method, for more complex processes.
It works with the WatchdogEventSubscriber
subscribed to WatchdogWoofCheckEvent
.
Anywhere you wish to check if it isWoofTime
, dispatch a new WatchdogWoofCheckEvent($parameters, $watchdogId)
,
and if it isWoofTime
, it will trigger all WatchdogHandlerInterface
s
and their processWoof(array $parameters = []) // passed to the WatchdogWoofCheckEvent constructor
.
$watchdogId
is null by default, which results in all defined watchdogs check.
If one is passed by this parameter, it checks only the concerned one.
If you wish to use it but your project isn't set to be autoconfigured, all your Handlers
implementing WatchdogHandlerInterface
must be tagged with raneomik_watchdog.handler
.
WIP: Profiler data collection
You can access watchdog data in Symfony profiler :
License