Nine Pedestrians Mesmerized

    filename-logger
    TypeScript icon, indicating that this package has built-in type declarations

    0.1.1 • Public • Published

    filename-logger

    debug wrapper. logging by filename.

      dynalee:operator/operator.js get undefined +0ms
      dynalee:model/model.js { id: 'hello2', detail: 'world' } +0ms
      dynalee:model/model.js Error: Item not found, hash(hello2, range(world)

    Install

    npm i filename-logger

    Usage

    import createLogger from 'filename-logger'
    
    const PROJECT_NAME = 'project'
    const log = createLogger(PROJECT_NAME, __filename)
    
    log('something')

    or

    const PROJECT_NAME = 'project'
    const createProjectLogger = createLogger(PROJECT_NAME)
    
    const log = createProjectLogger(__filename)
    
    log('something')

    License

    MIT

    Keywords

    none

    Install

    npm i filename-logger

    DownloadsWeekly Downloads

    9

    Version

    0.1.1

    License

    MIT

    Unpacked Size

    3.39 kB

    Total Files

    5

    Last publish

    Collaborators

    • deptno