Download the PHP package bnomei/kirby3-monolog without Composer
On this page you can find all versions of the php package bnomei/kirby3-monolog. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bnomei/kirby3-monolog
More information about bnomei/kirby3-monolog
Files in bnomei/kirby3-monolog
Package kirby3-monolog
Short Description Use Monolog to log data to files/databases/notifications/...
License MIT
Informations about the package kirby3-monolog
Kirby 3 Monolog
Use Monolog to log data to files/databases/notifications/...
Quickstart
site/templates/home.php
site/logs/2019-10-27.log
[2019-10-27 19:10:30] default.INFO: test-d4a22afc0f735f551748d17c959b3339 {"title":"Home","page":"home"} []
Page-Method
This plugin also registers a Page-Method. It will use the AutoID if available or fallback to hash based on the page->uid()
.
site/logs/{HASH}.log
[2019-10-27 19:10:30] {HASH}.INFO: test-d4a22afc0f735f551748d17c959b3339 {} []
Commerical Usage
Support open source!
This plugin is free but if you use it in a commercial project please consider to sponsor me or make a donation.
If my work helped you to make some cash it seems fair to me that I might get a little reward as well, right?
Be kind. Share a little. Thanks.
‐ Bruno
M | O | N | E | Y |
---|---|---|---|---|
Github sponsor | Patreon | Buy Me a Coffee | Paypal dontation | Hire me |
Installation
- unzip master.zip as folder
site/plugins/kirby3-monolog
or git submodule add https://github.com/bnomei/kirby3-monolog.git site/plugins/kirby3-monolog
orcomposer require bnomei/kirby3-monolog
Similar Plugin
- Log is simpler and can just write to files
Setup
Use the default channel provided by this plugin or define your own Channels. Monolog comes bundled with a lot of handlers, formatters and processors.
- write to file or syslogs
- send mails
- post to slack
- insert into local or remote databases
- format as JSON
- append file/class/method Introspection
- append a UUID
- append URI, post method and IP
- ... create your own
Usecase
Named Channel => Logger
Add records to the Logger
Message
Message and Context
Default Channel
The default channel provided by this plugin writes file to the site/logs
folder. It will be using the filename format date('Y-m-d') . '.log'
and normalizes the data to make logging Kirby Objects easier.
HINT: Without that normalization you would have to call
->value()
or cast asstring
on every Kirby Field before adding its value as context data.HINT: The default channel logs will be generated at same folder level as your accounts, cache or sessions. This way server setups for zero-downtime deployments are supported out of the box.
Custom Channel
site/config/config.php
Custom Channel Extends
site/config/config.php
Dependencies
Disclaimer
This plugin is provided "as is" with no guarantee. Use it at your own risk and always test it yourself before using it in a production environment. If you find any issues, please create a new issue.
License
It is discouraged to use this plugin in any project that promotes racism, sexism, homophobia, animal abuse, violence or any other form of hate speech.