This package has been deprecated

Author message:

This package has been moved to @dagonmetric/ng-log-applicationinsights. Please use it instead.

@bizappframework/ng-logging-application-insights
TypeScript icon, indicating that this package has built-in type declarations

7.1.0 • Public • Published

ng-logging-application-insights

npm version Gitter

Contains Microsoft Azure Application Insights logging target for Angular projects.

Installation

npm install @bizappframework/ng-logging-application-insights

Setup

import { BrowserAppInsightsModule } from '@bizappframework/ng-application-insights';
import { LoggerModule } from '@bizappframework/ng-logging';
import { AppInsightsLoggerModule } from '@bizappframework/ng-logging-application-insights';

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

        // Logging
        LoggerModule.forRoot({ minLevel: 'trace' }),
        AppInsightsLoggerModule,
        BrowserAppInsightsModule.forRoot({
            // instrumentationKey: environment.aiInstrumentationKey,
            verboseLogging: true,
            enableDebug: true
        })
    ]
})
export class AppModule { }

Usage

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.debug('Testing debug');
    }
}

Example

ng-logging-aspnetcore-sample

License

MIT License

Package Sidebar

Install

npm i @bizappframework/ng-logging-application-insights

Weekly Downloads

0

Version

7.1.0

License

MIT

Unpacked Size

83.1 kB

Total Files

38

Last publish

Collaborators

  • baf-contrib1
  • mmzliveid