1.0.10 • Published 2 years ago

@bluefinancefinland/logger v1.0.10

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

@bluefinance/logger

Provides an easy to use wrapper around

Installation

Usage and configuration in main entrypoint

import log from "@bluefinance/logger";

//
// Call configure in main entry point.
// After configuration, there will be a singleton of the logger
// that can be imported in other files (see example "Usage in other files")
log.configure({
  seqUrl: "https://seq.example.com:5341",
  appName: "demoapp",
  apiKey: "provide-if-given",
});

Usage in other files

import log from "@bluefinance/logger";

class Myclass {
  doSomething(sessionId: string) {
    log.info({ sessionId }, "Some interesting event with {sessionId}");
  }
}