# @bizappframework/ng-logging

> Contains logging abstractions and a few implementations for Angular projects based on [Microsoft ASP.Net Logging](https://github.com/aspnet/Logging).

Latest version **7.1.0** (published 2019-01-06) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @bizappframework/ng-logging
pnpm add @bizappframework/ng-logging
yarn add @bizappframework/ng-logging
bun add @bizappframework/ng-logging
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 7.1.0 |
| Published | 2019-01-06 |
| First published | 2018-03-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 243.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | BizAppFramework Team |
| Maintainers | baf-contrib1, mmzliveid |
| Keywords | angular, logging, angular-logging, aspnet-core-angular-logging |

## Links

- npm: https://www.npmjs.com/package/@bizappframework/ng-logging
- Repository: https://github.com/bizappframework/ng-logging
- Issues: https://github.com/bizappframework/ng-logging/issues
- npm.io page: https://npm.io/package/@bizappframework/ng-logging

## Dependencies (1)

- [tslib](https://npm.io/package/tslib.md) ^1.9.3

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads
- [child-process-debug](https://npm.io/package/child-process-debug.md) — 695 weekly downloads

## Recent versions

- 7.1.0 (latest) — 2019-01-06
- 7.0.0 — 2018-10-28
- 6.1.4 — 2018-10-12
- 6.1.3 — 2018-10-03
- 6.0.0-beta.1 — 2018-04-24
- 6.0.0-beta.0 — 2018-04-22
- 5.0.0-beta.6 — 2018-03-28
- 5.0.0-beta.5 — 2018-03-28
- 5.0.0-beta.4 — 2018-03-19
- 5.0.0-beta.3 — 2018-03-19
- 5.0.0-beta.2 — 2018-03-16
- 5.0.0-beta.0 — 2018-03-05

## README

ng-logging
=====================

[![npm version](https://badge.fury.io/js/%40bizappframework%2Fng-logging.svg)](https://badge.fury.io/js/%40bizappframework%2Fng-logging)  
[![Gitter](https://badges.gitter.im/BizAppFramework/general.svg)](https://gitter.im/DagonMetric/BizAppFramework?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)

Contains logging abstractions and a few implementations for Angular projects based on [Microsoft ASP.Net Logging](https://github.com/aspnet/Logging).

Installation
---------------

```bash
npm install @bizappframework/ng-logging
```

Setup
---------------

```typescript
import { ConsoleLoggerModule, LoggerModule } from '@bizappframework/ng-logging';

@NgModule({
    imports: [
        // Other module imports

        // Logging
        LoggerModule.forRoot({ minLevel: 'trace' }),
        ConsoleLoggerModule
    ]
})
export class AppModule { }
```

Usage
---------------

```typescript
import { Component, OnInit } from '@angular/core';

import { Logger, LoggerFactory } from '@bizappframework/ng-logging';

@Component({
    selector: 'app-root',
    templateUrl: './app.component.html'
})
export class AppComponent implements OnInit {
    private readonly _logger: Logger;

    constructor(loggerFactory: LoggerFactory) {
        this._logger = loggerFactory.createLogger('app');
    }

    ngOnInit(): void {
        this._logger.trace('Testing trace');
        this._logger.debug('Testing debug');
        this._logger.info('Testing info');
        this._logger.warn('Testing warn');
        this._logger.error('Testing error');
    }
}
```

Example
---------------

[ng-logging-aspnetcore-sample](https://github.com/BizAppFramework/ng-logging/tree/master/samples/ng-logging-aspnetcore-sample)

License
---------------

[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)](/LICENSE)

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