You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

aurelia-logging-file

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aurelia-logging-file

File appender for `aurelia-logging`

1.0.0
Source
npm
Version published
Weekly downloads
1
-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

aurelia-logging-file

NPM version NPM downloads Build status Coverage Status

File based appenders for aurelia-logging and @unional/logging.

Usage

import { addAppender } from 'aurelia-logging' // or `@unional/logging`
import { FileAppender } from 'aurelia-logging-file'

// All logs are appended to the same file.
const file = new FileAppender('filename.log')
addAppender(file)

// log away...

You can change the format of your messages:

import { stringifyLogLevel } from 'aurelia-logging-file'

new FileAppender('filename.log', { format: '{id}({LEVEL}): {messages}}' })
new FileAppender('filename.log', {
  format: (id, level, messages) => `${id}(${stringifyLogLevel(level)}): ${messages}`
})
  • {ID} will print logger id in upper case.
  • {LEVEL} will print log level in upper case.

FAQs

Package last updated on 09 Feb 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts