@elastic/ecs-helpers
Advanced tools
Comparing version 0.2.1 to 0.3.0
@@ -1,3 +0,9 @@ | ||
# Changelog | ||
# @elastic/ecs-helpers Changelog | ||
## v0.3.0 | ||
- Change `stringify()` to serialize "log.level" as a top-level dotted field | ||
per <https://github.com/elastic/ecs-logging/pull/33>. | ||
([#27](https://github.com/elastic/ecs-logging-js/pull/27)) | ||
## v0.2.1 | ||
@@ -4,0 +10,0 @@ |
{ | ||
"name": "@elastic/ecs-helpers", | ||
"version": "0.2.1", | ||
"version": "0.3.0", | ||
"description": "ECS loggers helpers", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -7,3 +7,3 @@ <img align="right" width="auto" height="auto" src="https://www.elastic.co/static-res/images/elastic-logo-200.png"> | ||
A set of helpers for the ECS logging libraries. | ||
A set of helpers for the ECS logging libraries. | ||
You should not directly used this package, but the ECS logging libraries instead. | ||
@@ -19,6 +19,6 @@ | ||
### `version` | ||
The currently supported version of [Elastic Common Schema](https://www.elastic.co/guide/en/ecs/current/index.html), | ||
The currently supported version of [Elastic Common Schema](https://www.elastic.co/guide/en/ecs/current/index.html). | ||
### `stringify` | ||
Function that serializes (very quickly!) an ECS object. | ||
Function that serializes (very quickly!) an ECS-format log record object. | ||
@@ -29,7 +29,7 @@ ```js | ||
'@timestamp': new Date().toISOString(), | ||
'log.level': 'info', | ||
message: 'hello world', | ||
log: { | ||
level: 'info', | ||
logger: 'test' | ||
}, | ||
message: 'hello world', | ||
ecs: { | ||
@@ -51,7 +51,7 @@ version: '1.4.0' | ||
'@timestamp': new Date().toISOString(), | ||
'log.level': 'info', | ||
message: 'hello world', | ||
log: { | ||
level: 'info', | ||
logger: 'test' | ||
}, | ||
message: 'hello world', | ||
ecs: { | ||
@@ -74,7 +74,7 @@ version: '1.4.0' | ||
'@timestamp': new Date().toISOString(), | ||
'log.level': 'info', | ||
message: 'hello world', | ||
log: { | ||
level: 'info', | ||
logger: 'test' | ||
}, | ||
message: 'hello world', | ||
ecs: { | ||
@@ -81,0 +81,0 @@ version: '1.4.0' |
@@ -16,6 +16,6 @@ // Licensed to Elasticsearch B.V under one or more agreements. | ||
'@timestamp': string, | ||
'log.level': string, | ||
log: { | ||
type: 'object', | ||
properties: { | ||
level: string, | ||
logger: string | ||
@@ -22,0 +22,0 @@ } |
15
test.js
@@ -30,6 +30,3 @@ // Licensed to Elasticsearch B.V under one or more agreements. | ||
'@timestamp': new Date().toISOString(), | ||
log: { | ||
level: 'info', | ||
logger: 'test' | ||
}, | ||
'log.level': 'info', | ||
message: 'hello world', | ||
@@ -48,6 +45,3 @@ ecs: { | ||
'@timestamp': 'not a date', | ||
log: { | ||
level: 'info', | ||
logger: 'test' | ||
}, | ||
'log.level': 'info', | ||
message: true, | ||
@@ -86,6 +80,3 @@ ecs: { | ||
'@timestamp': new Date().toISOString(), | ||
log: { | ||
level: 'info', | ||
logger: 'test' | ||
}, | ||
'log.level': 'info', | ||
message: 'hello world', | ||
@@ -92,0 +83,0 @@ ecs: { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23202
310
2