Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
freezer278 committed Dec 9, 2022
1 parent d30b17c commit e13df04
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 44 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Changelog

All notable changes to `:package_name` will be documented in this file.
All notable changes to `vmorozov/laravel_fluentd_logger` will be documented in this file.
68 changes: 28 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,17 @@
# vmorozov/laravel_fluentd_logger

[![Latest Version on Packagist](https://img.shields.io/packagist/v/:vendor_slug/:package_slug.svg?style=flat-square)](https://packagist.org/packages/:vendor_slug/:package_slug)
[![GitHub Tests Action Status](https://img.shields.io/github/workflow/status/:vendor_slug/:package_slug/run-tests?label=tests)](https://github.com/:vendor_slug/:package_slug/actions?query=workflow%3Arun-tests+branch%3Amain)
[![GitHub Code Style Action Status](https://img.shields.io/github/workflow/status/:vendor_slug/:package_slug/Fix%20PHP%20code%20style%20issues?label=code%20style)](https://github.com/:vendor_slug/:package_slug/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain)
[![Total Downloads](https://img.shields.io/packagist/dt/:vendor_slug/:package_slug.svg?style=flat-square)](https://packagist.org/packages/:vendor_slug/:package_slug)
<!--delete-->
---
This repo can be used to scaffold a Laravel package. Follow these steps to get started:
[![Latest Version on Packagist](https://img.shields.io/packagist/v/vmorozov/laravel_fluentd_logger.svg?style=flat-square)](https://packagist.org/packages/vmorozov/laravel_fluentd_logger)
[![Total Downloads](https://img.shields.io/packagist/dt/vmorozov/laravel_fluentd_logger.svg?style=flat-square)](https://packagist.org/packages/vmorozov/laravel_fluentd_logger)

1. Press the "Use this template" button at the top of this repo to create a new repo with the contents of this skeleton.
2. Run "php ./configure.php" to run a script that will replace all placeholders throughout all the files.
3. Have fun creating your package.
4. If you need help creating a package, consider picking up our <a href="https://laravelpackage.training">Laravel Package Training</a> video course.
---
<!--/delete-->
This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.
[comment]: <> ([![GitHub Tests Action Status]&#40;https://img.shields.io/github/workflow/status/vmorozov/laravel_fluentd_logger/run-tests?label=tests&#41;]&#40;https://github.com/vmorozov/laravel_fluentd_logger/actions?query=workflow%3Arun-tests+branch%3Amain&#41;)

## Support us
[comment]: <> ([![GitHub Code Style Action Status]&#40;https://img.shields.io/github/workflow/status/vmorozov/laravel_fluentd_logger/Fix%20PHP%20code%20style%20issues?label=code%20style&#41;]&#40;https://github.com/vmorozov/laravel_fluentd_logger/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain&#41;)

[<img src="https://github-ads.s3.eu-central-1.amazonaws.com/:package_name.jpg?t=1" width="419px" />](https://spatie.be/github-ad-click/:package_name)

We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us).

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards).
This package provides ability to use fluentd as log driver. It also add additional logging capabilities such as:
- Request log
- DB Query log
- Queue Jobs log
- Log tracing

## Installation

Expand All @@ -38,18 +27,29 @@ You can publish the config file with:
php artisan vendor:publish --tag="laravel_fluentd_logger-config"
```

This is the contents of the published config file:

Add middlewares to `app/Http/Kernel.php`:
```php
return [
protected $middleware = [
// ... other middlewares here
\Vmorozov\LaravelFluentdLogger\Middleware\LogRequestMiddleware::class,
\Vmorozov\LaravelFluentdLogger\Middleware\ContinueTraceMiddleware::class,
];
```

## Usage

Add fluentd log channel to `config/logging.php`:
```php
$variable = new VendorName\Skeleton();
echo $variable->echoPhrase('Hello, VendorName!');
// ...some exisiting channels

'fluentd' => [
'driver' => 'fluentd',
'level' => env('LOG_LEVEL', 'debug'),
],
```

Add ENV vars with fluentd configs:
```dotenv
FLUENTD_HOST=127.0.0.1
FLUENTD_PORT=24224
```

## Testing
Expand All @@ -58,21 +58,9 @@ echo $variable->echoPhrase('Hello, VendorName!');
composer test
```

## Changelog

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

## Contributing

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

## Security Vulnerabilities

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

## Credits

- [:author_name](https://github.com/:author_username)
- [Vladimir Morozov](https://github.com/freezer278)
- [All Contributors](../../contributors)

## License
Expand Down
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"name": "vmorozov/laravel_fluentd_logger",
"description": "Provides ability to use fluentd as log driver",
"description": "Provides ability to use fluentd as log driver.",
"keywords": [
"logs",
"advanced logging",
"laravel",
"tracing",
"log tracing",
"debugging",
"request logs",
"db query logs",
"request log",
"db query log",
"fluentd",
"EFK Stack",
"ELK Stack"
Expand Down

0 comments on commit e13df04

Please sign in to comment.