# makskow-winston-azure-blob-transport

> Winston Azure blob transport

Latest version **2.1.2** (published 2019-07-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install makskow-winston-azure-blob-transport
pnpm add makskow-winston-azure-blob-transport
yarn add makskow-winston-azure-blob-transport
bun add makskow-winston-azure-blob-transport
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.2 |
| Published | 2019-07-30 |
| First published | 2019-07-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Unpacked size | 21.5 KB |
| Known vulnerabilities | 0 (+6 in 2 direct dependencies) |
| Install scripts | no |
| Author | Parsimotion |
| Maintainers | maxkow |

## Links

- npm: https://www.npmjs.com/package/makskow-winston-azure-blob-transport
- Repository: https://github.com/Makskow/winston-azure-blob-transport
- Homepage: https://github.com/Parsimotion/winston-azure-blob-transport#readme
- Issues: https://github.com/Parsimotion/winston-azure-blob-transport/issues
- npm.io page: https://npm.io/package/makskow-winston-azure-blob-transport

## Dependencies (7)

- [async](https://npm.io/package/async.md) 2.0.1
- [chunk](https://npm.io/package/chunk.md) 0.0.2
- [debug](https://npm.io/package/debug.md) 3.1.0
- [lodash](https://npm.io/package/lodash.md) 4.17.15
- [bluebird](https://npm.io/package/bluebird.md) 3.5.1
- [azure-storage](https://npm.io/package/azure-storage.md) 2.10.3
- [error-to-json](https://npm.io/package/error-to-json.md) 1.1.0

## Recent versions

- 2.1.2 (latest) — 2019-07-30

## README

# winston-azure-blob-transport

[![NPM version](https://badge.fury.io/js/ehealth-winston-azure-blob-transport.png)](http://badge.fury.io/js/ehealth-winston-azure-blob-transport)

A [Windows Azure][0] blob storage transport for [winston][1].

## Credit
NOTE: This is a fork of https://github.com/Parsimotion/winston-azure-blob-transport, 99% of the code in this repository was written by user Parsimotion on github.
    This fork simply adds the ability to specify a max file size.

## Installation

``` bash
  $ npm install winston
  $ npm install ehealth-winston-azure-blob-transport
```

## Usage
``` js
  var winston = require("winston");
  require("winston-azure-blob-transport");

  var logger = new (winston.Logger)({
    transports: [
      new (winston.transports.AzureBlob)({
        account: {
          name: "Azure storage account sub domain ([A-Za-z0-9])",
          key: "The long Azure storage secret key"
        },
        containerName: "A container name",
        blobName: "The name of the blob",
        level: "info"
      })
    ]
  });
  
  logger.warn("Hello!");
```


The Azure transport accepts the following options:

* __level:__ Level of messages that this transport should log (defaults to `info`).
* __account.name:__ The name of the Windows Azure storage account to use
* __account.key:__ The access key used to authenticate into this storage account
* __blobName:__ The name of the blob to log.
* __containerName:__ The container which will contain the logs.
* __maxBlobSize:__ The size in MB when a new blob file should be created.
            Note that the file size may go over the max size. But a  new one will be created within one hour of exceeding the max.
* __maxBlockCount:__ How many commited blobs should be written before a new blob is created. Note that currently azure has a maximum of 50000 before errors are thrown. The default value in this module is 48000
[0]: http://www.windowsazure.com/en-us/develop/nodejs/
[1]: https://github.com/flatiron/winston

---
_Source: https://npm.io/package/makskow-winston-azure-blob-transport · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
