Ninety Percent Muffin

    app-logging
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.4 • Public • Published

    App Logging

    app-logging is a javascript log package that helps you write logs in your application. The logs are stored in a storage folder by default in the root of your application.

    Installation

    Use the package manager npm to install foobar.

    npm install app-logging

    Usage

    const AppLog = require('app-logging').Log;
    
    const log = new AppLog();
    
    # Writing Info Logs
    log.info('info message', 'contextual-data');
    
    # Writing Error Logs
    log.error('error message', 'contextual-data');
    
    # Writing Debug Logs
    log.info('debug message', 'contextual-data');
    
    # Writing Warning Logs
    log.info('warning message', 'contextual-data');
    
    # Writing Critical Logs
    log.info('critical message', 'contextual-data');
    
    # Writing Emergency Logs
    log.info('emergency message', 'contextual-data');
    
    # Writing Notice Logs
    log.info('notice message', 'contextual-data');
    
    # Writing Alert Logs
    log.info('alert message', 'contextual-data');

    With TypeScript

    import { Log } from 'app-logging'
    
    const log = new Log();
    
    # Writing Info Logs
    log.info('info message', 'contextual-data');
    
    # Writing Error Logs
    log.error('error message', 'contextual-data');
    
    # Writing Debug Logs
    log.info('debug message', 'contextual-data');
    
    # Writing Warning Logs
    log.info('warning message', 'contextual-data');
    
    # Writing Critical Logs
    log.info('critical message', 'contextual-data');
    
    # Writing Emergency Logs
    log.info('emergency message', 'contextual-data');
    
    # Writing Notice Logs
    log.info('notice message', 'contextual-data');
    
    # Writing Alert Logs
    log.info('alert message', 'contextual-data');

    Contributing

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

    Please make sure to update tests as appropriate.

    License

    MIT

    Install

    npm i app-logging

    DownloadsWeekly Downloads

    6

    Version

    1.0.4

    License

    ISC

    Unpacked Size

    23.4 kB

    Total Files

    8

    Last publish

    Collaborators

    • faisalscientist