https://github.com/martinrusev/solid-php
PHP Client for Amon
https://github.com/martinrusev/solid-php
Last synced: about 1 month ago
JSON representation
PHP Client for Amon
- Host: GitHub
- URL: https://github.com/martinrusev/solid-php
- Owner: martinrusev
- Created: 2011-11-02T09:59:46.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2013-04-03T07:58:15.000Z (about 12 years ago)
- Last Synced: 2025-04-12T11:12:56.362Z (about 1 month ago)
- Language: PHP
- Homepage: http://amon.cx/guide/clients/php
- Size: 116 KB
- Stars: 28
- Watchers: 3
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Install
Download the client from [https://github.com/martinrusev/amon-php](https://github.com/martinrusev/amon-php)
## Configuration
require_once 'amon.php'
Amon::config(array('host'=> 'http://127.0.0.1', 'port' => 2464,
'secret_key': 'the secret key from /etc/amonlite.conf'));## Usage
### Logging
You can use the logging module in any PHP application:
# message - array, string
Amon::log(message, tags);# Will still work and in the web interface you will see these logs with level 'unset'
Amon::log(message);# Tagged logging
Amon::log(message, array('debug', 'info'));### Exception handling
To capture exceptions triggered from your PHP applications, add the following 2 lines in your index.php file
require "amon.php";
Amon::setup_exception_handler();