Popularity
1.0
Stable
Activity
6.0
-
65
4
2

Description

This library provides a function log() which is like console.log, but with superpowers: it can be used in expressions - f(log(x)), and it supports plugins. For example, there are plugins for setting a severity level, for adding badges, and for logging functions, iterables, promises and RxJS observables. Instead of writing log messages to the console, you can inspect them in unit tests with help of Jest's snapshots feature.

The library is fully documented, but I've also written an article that introduces it to RxJS users (logging RxJS observables is just one use case, but one which the library grew out from): https://dev.to/ivan7237d/log-and-test-rxjs-observables-with-1log-5cbm

Programming language: TypeScript
License: MIT License
Tags: Log     Testing     Developer Tools     Test     RxJS     Jest     Snapshot    
Latest version: v3.0.0

1log alternatives and similar libraries

Based on the "Log" category.
Alternatively, view 1log alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of 1log or a related project?

Add another 'Log' Library

README

<!-- README for NPM; the one for GitHub is in .github directory. -->

gzip size tree shaking types coverage status

This library provides a function log that can be used as the regular console.log, but has two superpowers: you can insert it into any expression, as in f(log(x)), and it supports plugins. There are plugins for setting severity level, for logging functions, async functions, promises, iterables, async iterables, observables, for creating snapshots of log messages in Jest tests, and more.

Please refer to the GitHub README for full documentation and screenshots.