Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

angular-logz-io

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-logz-io

Integrate logzio logging in your Angular app.

  • 0.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

angular-logz-io

Integrate logzio logging in your Angular app.

Installation

npm i --save logzio-ts angular-logz-io

How to use in app code

In order to use angular-logz-io in your module, add the following definitions:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';
import { AngularLogzIoModule, LogzioOptions, AbstractLogger, AngularLogzIoService } from 'angular-logz-io';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    AngularLogzIoModule
  ],
  providers: [
    { provide: LogzioOptions, useValue: { token: 'YOUR_LOGZIO_TOKEN' }},
    { provide: AbstractLogger, useClass: AngularLogzIoService},
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }

You can then inject the AbstractLogger service to use it in a component:

constructor(private logz: AbstractLogger) {}

Logging is very simple to use:

testService() {
  console.log('Logging to logz.io');
  this.logz.info('got event logzio');
}

Keywords

FAQs

Package last updated on 29 Jun 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc