https://github.com/ytake/fluent-logger-hack
A structured logger for Fluentd (Hack/HHVM)
https://github.com/ytake/fluent-logger-hack
fluentd hacklang logger
Last synced: about 1 month ago
JSON representation
A structured logger for Fluentd (Hack/HHVM)
- Host: GitHub
- URL: https://github.com/ytake/fluent-logger-hack
- Owner: ytake
- License: mit
- Created: 2019-06-26T11:30:54.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-07-03T01:15:14.000Z (over 5 years ago)
- Last Synced: 2024-10-05T22:03:23.601Z (over 1 year ago)
- Topics: fluentd, hacklang, logger
- Language: Hack
- Homepage:
- Size: 40 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Fluent Logger Hack
## Requirements
HHVM 4.8 or higher
fluentd v0.9.20 or higher
## Example
```hack
require_once __DIR__ . '/vendor/hh_autoload.php';
use namespace Ytake\Fluent\Logger;
<<__EntryPoint>>
async function main(): Awaitable {
$logger = new Logger\FluentLoggerFactory();
await using ($l = $logger->getLogger('1.2.3.4')) {
$l->sendLogAsync('hack.testing', dict[
'message' => 'send.'
]);
};
}
```