New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

aurelia-logging-file

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.2
latest
Version published
Maintainers
1
Created

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 13 May 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