1.1.4 • Published 5 years ago

@cladikzone/logger-module v1.1.4

Weekly downloads
6
License
ISC
Repository
-
Last release
5 years ago

Logger Module

This is a common logger module which supports Aws cloudwatch and winston log features.

Usage

import * as oxStreet from '@cladikzone/logger-module';

const factory = new oxStreet.LoggerFactory({
    aws: {
        accessKeyId: '...',
        secretAccessKey: '...',
        region: '...',
    },
    transports: [
        new oxStreet.transports.Console(),
        new oxStreet.transports.File({ filename: './logs/error.log', level: 'error' }),
        new oxStreet.transports.File({ filename: './logs/audit.log', level: 'audit' }),
    ],
});

const audit = factory.create({
    logGroupName: 'PRODUCT_SERVICE', // Required
    logStreamName: 'stream-one',
    level: 'audit', // Required
    streamAsLevel: true,  // If this is true, your 'logStreamName' parameter will be ignored and the 'level' will be used as the stream name.
});

audit('Something');
audit('Something very critical');
...
1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.16

5 years ago

1.0.15

5 years ago

1.0.14

5 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago