@user-office-software/duo-logger
TypeScript icon, indicating that this package has built-in type declarations

2.2.1 • Public • Published

duo-logger

duo-logger is a standalone NPM library developed for UserOfficeSoftware that provides simple and common interface for sending logs. Library is integrated with several applications and is configurable with variety of logging services. Comes with these out of the box implementations:

  • Console Logger
  • GrayLog
  • Mute Logger

Installation

Use the package manager npm to install duo-logger.

npm install @user-office-software/duo-validation

Usage

Example for setting up console logger

import { ConsoleLogger, setLogger } from '@user-office-software/duo-logger';

// set ConsoleLogger as your logging service
setLogger(new ConsoleLogger());

Example for setting up Graylog logger

setLogger(
  new GrayLogLogger(
    'my-graylog-server.com',
    12201,
    { environment: 'develop', service: 'my-service' },
    []
  )
);

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i @user-office-software/duo-logger

Weekly Downloads

456

Version

2.2.1

License

ISC

Unpacked Size

15.3 kB

Total Files

19

Last publish

Collaborators

  • esss-swap
  • stfcserviceaccount
  • panda-attwood-stfc