# inversify-logging

> Contextual logging for [inversify](https://github.com/inversify/InversifyJS) powered applications.

Latest version **0.2.1** (published 2018-03-05) · 0 weekly downloads

## Install

```sh
npm install inversify-logging
pnpm add inversify-logging
yarn add inversify-logging
bun add inversify-logging
```

## Health

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

Positive: has types; no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2018-03-05 |
| First published | 2017-10-19 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 16 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | tierratelematics |

## Links

- npm: https://www.npmjs.com/package/inversify-logging
- npm.io page: https://npm.io/package/inversify-logging

## Dependencies (2)

- [lodash](https://npm.io/package/lodash.md) ^4.17.5
- [reflect-metadata](https://npm.io/package/reflect-metadata.md) 0.1.8

## Recent versions

- 0.2.1 (latest) — 2018-03-05
- 0.2.0 — 2018-02-14
- 0.1.2 — 2017-11-20
- 0.1.1 — 2017-10-24
- 0.1.0 — 2017-10-19

## README

# Inversify logging

Contextual logging for [inversify](https://github.com/inversify/InversifyJS) powered applications.

## Installation

`
$ npm i inversify-logging
`

## Usage

Activate the logger for an inversify container:

```typescript
import {activateLogging} from "inversify-logging";

activateLogging(inversifyContainer);
```

And log!

```typescript
import {inject} from "inversify";
import {ILogger, LoggingContext} from "inversify-logging";

@LoggingContext("TestClass")
class TestClass {

    @inject("ILogger") logger: ILogger; //Currently only logger injection on properties is supported

    constructor() {
        logger.info("Logs!"); // This outputs [TestClass] Logs!
    }
}
```


## License

Copyright 2016 Tierra SpA

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

[http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

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