Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/megaads-vn/php-megalogger-client
Megalogger client PHP library
https://github.com/megaads-vn/php-megalogger-client
Last synced: 10 days ago
JSON representation
Megalogger client PHP library
- Host: GitHub
- URL: https://github.com/megaads-vn/php-megalogger-client
- Owner: megaads-vn
- Created: 2016-08-04T03:15:04.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-24T04:18:52.000Z (almost 8 years ago)
- Last Synced: 2024-12-18T22:31:49.122Z (20 days ago)
- Language: PHP
- Homepage:
- Size: 9.77 KB
- Stars: 1
- Watchers: 7
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# php megalogger client
##Installation:
```javascript
composer require megaads-vn/megalogger
```
###OR
**add in file composer.json**
```javascript
"require": {
"megaads-vn/megalogger":"dev-master"
}
```
##Usage:
**Create an instance of the MegaLogger\Logger class**```
use MegaLogger\Logger;$apiKey = "asefas_efjhj-afsd64sf";
$source = "Your source";
$initData = array(
'apiKey' => $apiKey,
'source' => $source
);
$loggerClient = new Logger($initData);// Get level: info, debug, warning, error, critical
$levelObj = new Level();
$level = $levelObj->getLevelInfo();$data = array("message" => "Message attachment token", "title" => "Title for push log");
//push log$response = $loggerClient->pushLog($level, $data);
echo '';';
print_r($response);
echo '
```