JSPM

ara-console

0.3.0
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 3
    • Score
      100M100P100Q36634F
    • License LGPL-3.0

    Logging functions for Ara modules so logging is consistent.

    Package Exports

    • ara-console

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ara-console) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    ara-console

    Build Status

    Logging functions for Ara modules to ensure consistent console logs.

    Status

    Stable

    Installation

    $ npm install arablocks/ara-console

    Example

    Print out examples of all logs.

    $ node example.js

    API

    console = require('ara-console')([label])

    This module exports a series of utility logging functions for use in several Ara modules.

    console.log(stream, prefix, format, ...message)

    Writes a formatted message with a prefix to a given stream like stdout or stderr.

    const { log } = require('ara-console')
    log(process.stdout, 'info: ', '%s %s', someMessage, otherMessage)

    console.error(format, ...message)

    Prints a formatted error message to stderr.

    const { error } = require('ara-console')
    error("fatal: ", someMessage)

    console.info(format, ...message)

    Prints a formatted info message to stdout.

    const { info } = require('ara-console')
    info("fatal: ", someMessage)

    console.warn(format, ...message)

    Prints a formatted warn message to stderr.

    const { warn } = require('ara-console')
    warn("fatal: ", someMessage)

    Contributing

    Releases follow Semantic Versioning

    See Also

    License

    LGPL-3.0