# pour-azure-logger

> Pour node.js module is for simple and secure Azure log management.

Latest version **0.1.14** (published 2016-03-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install pour-azure-logger
pnpm add pour-azure-logger
yarn add pour-azure-logger
bun add pour-azure-logger
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.14 |
| Published | 2016-03-16 |
| First published | 2016-01-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| Author | Pour |
| Maintainers | pour |
| Keywords | azure, logger, diagnostics, log, pour, table, search |

## Links

- npm: https://www.npmjs.com/package/pour-azure-logger
- npm.io page: https://npm.io/package/pour-azure-logger

## Dependencies (1)

- [crypto-js](https://npm.io/package/crypto-js.md) 3.1.6

## Alternatives

- [@lexical/table](https://npm.io/package/@lexical/table.md) — 3.0M weekly downloads
- [mantine-datatable](https://npm.io/package/mantine-datatable.md) — 98.2K weekly downloads
- [react-native-collapsible-tab-view](https://npm.io/package/react-native-collapsible-tab-view.md) — 70.6K weekly downloads
- [@handsontable/vue3](https://npm.io/package/@handsontable/vue3.md) — 16.1K weekly downloads
- [vuewordcloud](https://npm.io/package/vuewordcloud.md) — 7.2K weekly downloads

## Recent versions

- 0.1.14 (latest) — 2016-03-16
- 0.1.3 (beta) — 2016-01-26
- 0.1.13 — 2016-01-28
- 0.1.12 — 2016-01-27
- 0.1.11 — 2016-01-27
- 0.1.10 — 2016-01-26
- 0.1.9 — 2016-01-26
- 0.1.8 — 2016-01-26
- 0.1.7 — 2016-01-26
- 0.1.6 — 2016-01-26
- 0.1.5 — 2016-01-26
- 0.1.4 — 2016-01-26
- 0.1.2 — 2016-01-26
- 0.1.1 — 2016-01-26
- 0.1.0 — 2016-01-26

## README

Pour has what you need for Azure log management. It is lightweight, secure and fast. You can search, filter and easily scale.

## Install npm module.

From console, run the following command
```bash
npm install pour-azure-logger
```

==================================

## Generate an app token from the portal [www.trypour.com](http://www.trypour.com).

Login to [the portal](http://www.trypour.com).

Create a new app token using your storage account name and primary access key.

Copy the generated token.

NOTE: Detailed information on creating and retrieving storage account name and primary access key can be found [here](https://azure.microsoft.com/en-us/documentation/articles/storage-create-storage-account/).

==================================

## Start logging!

Import the library. 
```javascript
// Pour library
var logger = require('pour-azure-logger');
```

Initialize the logger.
```javascript
// Copy the app token generated in the previous step
logger.connect('paste-app-token-here', [callback]);
```

(Optional) Set common log properties via setContext method. You only need to set context information once just like initialization. Again ideally this can be done in your application's initialization logic. All the context information will be attached to each log message automatically. 
```javascript
// Set custom context information
logger.setContext('Environment', 'read-some-environment-value i.e. process.env.Environment');

// Set Azure role name and id as context to attach each log message
logger.setContext('RoleName', 'read-some-environment-value i.e. process.env.RoleName');
logger.setContext('RoleId', 'read-some-environment-value i.e. process.env.RoleId');
```

Start logging.
```javascript 
logger.critical('A critical message');
logger.error('An error message');
logger.warning('A warning message');
logger.info('An info message');
logger.verbose('A verbose message');
```

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