Socket
Socket
Sign inDemoInstall

@elastic/ecs-helpers

Package Overview
Dependencies
Maintainers
74
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@elastic/ecs-helpers - npm Package Compare versions

Comparing version 0.2.1 to 0.3.0

8

CHANGELOG.md

@@ -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 @@

2

package.json
{
"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 @@ }

@@ -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: {

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