Gathering detailed insights and metrics for @natlibfi/loglevel-message-prefix
Gathering detailed insights and metrics for @natlibfi/loglevel-message-prefix
npm install @natlibfi/loglevel-message-prefix
Typescript
Module System
Node Version
NPM Version
70.6
Supply Chain
97.7
Quality
74.5
Maintenance
100
Vulnerability
98.9
License
JavaScript (100%)
Love this project? Help keep it running — sponsor us today! 🚀
Total Downloads
27,929
Last Day
5
Last Week
148
Last Month
698
Last Year
9,915
15 Stars
36 Commits
5 Forks
8 Watching
2 Branches
13 Contributors
Minified
Minified + Gzipped
Latest Version
3.0.1
Package Id
@natlibfi/loglevel-message-prefix@3.0.1
Size
7.60 kB
NPM Version
4.2.0
Node Version
7.10.0
Cumulative downloads
Total Downloads
Last day
-82.1%
5
Compared to previous day
Last week
-32.4%
148
Compared to previous week
Last month
60.1%
698
Compared to previous month
Last year
51.6%
9,915
Compared to previous year
Plugin for loglevel which allows defining prefixes for log messages
Clone the sources and install the package (In the source directory) on command line using npm
:
1npm install
Run the following NPM script to lint, test and check coverage of the code:
1 2npm run check 3
1 2define(['loglevel', 'loglevel-message-prefix'], function(log, loglevelMessagePrefix) { 3 4 loglevelMessagePrefix(log, { 5 staticPrefixes: ['foobar'] 6 }); 7 8 log.warn('TEST'); 9 10}); 11
1 2var log = require('loglevel'); 3var loglevelMessagePrefix = require('loglevel-message-prefix'); 4 5loglevelMessagePrefix(log, { 6 staticPrefixes: ['foobar'] 7}); 8 9log.warn('TEST'); 10
Code:
1 2var log = require('loglevel-message-prefix')(require('loglevel'), { 3 prefixes: ['level'], 4 staticPrefixes: ['foo', 'bar'], 5 separator: '/' 6}); 7 8log.setLevel('info'); 9 10log.info('Testing'); 11
Output:
[INFO/foo/bar]: Testing
The configuration object is passed as the second argument to the function. Following properties are supported ():
['timestamp', 'level']
. Available prefixes are:
%p
is replaced with the prefix). Defaults to [%p]:
).{hour12: false}
The properties are defined the schema file.
Copyright (c) 2015-2017 University Of Helsinki (The National Library Of Finland)
This project's source code is licensed under the terms of MIT License.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 2/28 approved changesets -- score normalized to 0
Reason
project is archived
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-02-03
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More