@assetory/logger
    TypeScript icon, indicating that this package has built-in type declarations

    0.2.0 • Public • Published

    logger

    A redis logger, written in typescript

    install

    npm install assetory-logger

    usage

    Import Logger from module

    import { Logger } from 'assetory-logger';

    Initialize new Logger instance with options

    key description
    serviceName Name of the service, to distinguish logs from other services.
    const logger = new Logger({
        serviceName: process.env.SERVICE_NAME,
        limitAmount: 3,
        throwErrors: true,
        connectionOptions:
        {
            port: process.env.REDIS_PORT,
            host: process.env.REDIS_HOST,
            servername: process.env.REDIS_SERVERNAME,
            password: process.env.REDIS_PASSWORD,
        },
    });

    Create log message of one of the following types:

    • fatal
    • error
    • warn
    • info
    • debug
    • trace

    example:

    logger.info('log message');

    Keywords

    none

    Install

    npm i @assetory/logger

    DownloadsWeekly Downloads

    12

    Version

    0.2.0

    License

    Apache-2.0

    Unpacked Size

    43.7 kB

    Total Files

    14

    Last publish

    Collaborators

    • frederikreich