Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
blue32a committed May 25, 2020
1 parent 884f683 commit 7b0408d
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,30 @@
# monolog-azure-blob
Azure Blob Storage Handler for Monolog

![Test](https://github.com/blue32a/monolog-azure-blob/workflows/Test/badge.svg)

## About

Azure Blob Storage Handler for [Monolog](https://github.com/Seldaek/monolog).

## Installation

```console
$ composer require blue32a/laravel-azure-blob-storage
```

## Usage

`Append Blob` must be created.

```php
$connection = 'DefaultEndpointsProtocol=https;AccountName=<name>;AccountKey=<key>';
$client = \MicrosoftAzure\Storage\Blob\BlobRestProxy::createBlobService($connection);

$logger = new \Monolog\Logger();

$handler = \Blue32a\Monolog\Handler\AzureBlobStorageHandler($client, 'container', 'append-blob.log');
$logger->pushHandler($handler);

// Write to Append Blob
$logger->info('Hello World!');
```

0 comments on commit 7b0408d

Please sign in to comment.