6.0.2 • Published 6 years ago

ngx-loggly-logger-with-fields v6.0.2

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

ngx-loggly-logger Build Status

Description

Simple library to log to loggly in Angular

Installation

Version 5.x is for angular 5, 4.x is for angular 4, if you are on earlier versions of angular try version 0.0.21

To install follow this procedure:

  1. npm install ngx-loggly-logger --save
  2. Add LogglyService import to your @NgModule like example below

    import { NgModule } from '@angular/core';
    import { BrowserModule } from '@angular/platform-browser';
    import { MyTestApp } from './my-test-app';
    import { NgxLogglyModule } from 'ngx-loggly-logger';
    
    @NgModule({
        providers:    [ ],
        imports:      [ BrowserModule, NgxLogglyModule.forRoot() ],
        declarations: [ MyTestApp ],
        bootstrap:    [ MyTestApp ]
    })
    export class MyTestAppModule {}
  3. Use the following in your components, etc.

    import { LogglyService } from 'ngx-loggly-logger';
    
    constructor(private _logglyService:LogglyService) {
        }
    
    // Init to set key and tag and sendConsoleErrors boolean
    this._logglyService.push({
        logglyKey: 'Your Loggly Key goes here',
        sendConsoleErrors : true, // Optional set true to send uncaught console errors
        tag : 'loggly-logger'
    });
// To send logs to loggly
this._logglyService.push('Your log message');
```
6.0.2

6 years ago

6.0.1

6 years ago

6.0.0

6 years ago

5.0.0

7 years ago

4.2.2

7 years ago

4.0.7

7 years ago

4.2.1

7 years ago

4.2.0

7 years ago

4.1.0

7 years ago

4.0.6

7 years ago