Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

apheleia

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apheleia - npm Package Compare versions

Comparing version 1.0.0-rc.2 to 1.0.0

18

docs/API.md

@@ -133,3 +133,3 @@ # API

A Writable stream.
A Writable stream instance or a SonicBoom instance.

@@ -161,3 +161,19 @@ ### format

### dateFormat (optional)
A date format supported by [fast-date-format](https://github.com/SerayaEryn/fast-date-format). Defaults to `YYYY-MM-DDTHH:mm:ss.SSS[Z]`.
### serializers (optional)
Allows to add custom serializers for objects.
<a id="jsonformatapi"></a>
## JsonFormat([options])
### dateFormat (optional)
A date format supported by [fast-date-format](https://github.com/SerayaEryn/fast-date-format). Defaults to a timestamp.
### serializers (optional)
Allows to add custom serializers for objects.

5

lib/JsonFormat.js

@@ -9,3 +9,3 @@ 'use strict'

const jsonEscape = require('json-escaping')
const { levelsSym, dateFormatterSym } = require('./Symbols')
const { dateFormatterSym } = require('./Symbols')
const fastifySerializers = require('./FastifySerializers').json

@@ -19,3 +19,2 @@

})
this[levelsSym] = options.levels || DEFAULT_LEVELS
this.serializers = options.serializers || fastifySerializers

@@ -26,3 +25,3 @@ }

let timestamp = this[dateFormatterSym].format()
let line = `{"time":${timestamp},"level":${this[levelsSym][level]}`
let line = `{"time":${timestamp},"level":${DEFAULT_LEVELS[level]}`

@@ -29,0 +28,0 @@ let stack = null

{
"name": "apheleia",
"version": "1.0.0-rc.2",
"version": "1.0.0",
"description": "fast and simplistic logger.",

@@ -5,0 +5,0 @@ "main": "lib/Apheleia.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc