sockslog

1.0.4 • Public • Published

SocksLog

SocksLog is a logging utility that allows you to log messages with different levels (INFO, WARN, ERROR) both locally and remotely.

Features

  • Log messages with different levels: INFO, WARN, ERROR
  • Remote logging to a database
  • Client for real-time log streaming

Installation

npm install sockslog

Then create an account on https://kvs.wireway.ch and create a database and copy its ID from the URL and the access token using the button.

Usage

Logger Usage without remote

const logger = require('sockslog');

logger.setup({
    noRemote: true
});

logger.info('Hello World');

Logger Usage with remote

const logger = require('sockslog');

logger.setup({
    accessToken: 'ENTER_YOUR_ACCESS_TOKEN',
    kvsId: 'ENTER_YOUR_ID'
});

logger.info('Hello World');

Client/Viewer Usage

const logger = require('sockslog');

logger.setup({
    accessToken: 'ENTER_YOUR_ACCESS_TOKEN',
    kvsId: 'ENTER_YOUR_ID'
});

logger.client()

/sockslog/

    Package Sidebar

    Install

    npm i sockslog

    Weekly Downloads

    13

    Version

    1.0.4

    License

    ISC

    Unpacked Size

    9.24 kB

    Total Files

    6

    Last publish

    Collaborators

    • obvtiger