Function addMongoDBTransport

  • Description

    this function is used to add MongoDB transport to the logger

    Example

    import { addMongoDBTransport, logger } from '@mdazad/common-utils';

    addMongoDBTransport("mongodb://localhost:27017/test", logger);

    Example

    import { addMongoDBTransport, logger } from '@mdazad/common-utils';

    addMongoDBTransport("mongodb://localhost:27017/test", logger, "error_log");

    Parameters

    • dbUrl: string
    • logger: Logger
    • collection: string = 'error_log'

    Returns void

Generated using TypeDoc