Installations
npm install @emartech/key-value-to-json-log
Developer Guide
Typescript
No
Module System
CommonJS
Min. Node Version
16
Node Version
16.6.1
NPM Version
7.20.3
Score
66.8
Supply Chain
85.7
Quality
82.7
Maintenance
100
Vulnerability
99.3
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Love this project? Help keep it running — sponsor us today! 🚀
Developer
emartech
Download Statistics
Total Downloads
13,695
Last Day
3
Last Week
35
Last Month
99
Last Year
882
GitHub Statistics
54 Commits
1 Forks
10 Watching
1 Branches
15 Contributors
Package Meta Information
Latest Version
2.2.0
Package Id
@emartech/key-value-to-json-log@2.2.0
Size
3.32 kB
NPM Version
7.20.3
Node Version
16.6.1
Publised On
11 Aug 2021
Total Downloads
Cumulative downloads
Total Downloads
13,695
Last day
200%
3
Compared to previous day
Last week
600%
35
Compared to previous week
Last month
39.4%
99
Compared to previous month
Last year
-59.6%
882
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dev Dependencies
5
@emartech/key-value-to-json-log
This tool is written to convert all logs generated by logentries-logformat in a process to be able to use and log with @emartech/json-logger.
Installation
1npm install @emartech/key-value-to-json-log
or you can use it through npx
1npx -p @emartech/key-value-to-json-log -c '<YOUR_PROCESS_TO_LOG> | key-value-to-json-log'
Usage
Command Line
Just pipe your process into the key-value-to-json-log
bin.
1node server/process/web | key-value-to-json-log
And now all incoming logs will be converted and output to process.stdout
(or where @emartech/json-logger is logging).
Transformation rules
During the transformation the following rules are applied. Please refine your alerts!
Namespace/eventName
The namespace (type
) will be logged as name
, as the event's name (event
) will be action
.
The level of your log (previously result
) is converted to a log level (level
) by @emartech/json-logger. key-value-to-json-log
uses the following mapping:
- by default, everything is
debug (20)
success
will beinfo (30)
error
will beerror (50)
Timestamp
Even if the log message has a timestamp in it, it will be truncated and @emartech/json-logger will add its own time
.
Key format
All log keys will be converted to snake_case.
Exception/Error
key-value-to-json-log
detects if an Error had been logged and will transform the incoming name
, message
, code
and stack
keys by prefixing with error_
as it would be done by @emartech/json-logger if you would log an Error with logger.fromError()
.
Numbers
All incoming number values will be converted to float
/int
in the JSON output.
License
May be freely distributed under the MIT license.
Copyright (c) 2018 Emarsys Technologies Ltd. and other contributors
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
security policy file detected
Details
- Info: security policy file detected: github.com/emartech/.github/SECURITY.md:1
- Info: Found linked content: github.com/emartech/.github/SECURITY.md:1
- Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/emartech/.github/SECURITY.md:1
- Info: Found text in security policy: github.com/emartech/.github/SECURITY.md:1
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
project is archived
Details
- Warn: Repository is archived.
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
11 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-8hfj-j24r-96c4
- Warn: Project is vulnerable to: GHSA-wc69-rhjr-hc9g
- Warn: Project is vulnerable to: GHSA-56x4-j7p9-fcf9
- Warn: Project is vulnerable to: GHSA-v78c-4p63-2j6c
- Warn: Project is vulnerable to: GHSA-qrpm-p2h7-hrv2
- Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55
- Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j
Score
2.6
/10
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