Comparing version 2.0.3 to 2.0.4
@@ -12,3 +12,9 @@ # bunyan Changelog | ||
## 2.0.4 (beta) | ||
- [pull #558] Update minimum "moment" version to 2.19.3 for CVE-2017-18214. | ||
- [issue #589] Use `os.EOL` for newlines in bunyan output, which helps with | ||
some Unix-EOL-naive apps like notepad. (By @bwknight877.) | ||
- Development change: Switched to GitHub Actions for CI. | ||
## 2.0.3 (beta) | ||
@@ -15,0 +21,0 @@ |
@@ -909,3 +909,3 @@ /** | ||
if (noemit || this.haveNonRawStreams) { | ||
str = fastAndSafeJsonStringify(rec) + '\n'; | ||
str = fastAndSafeJsonStringify(rec) + os.EOL; | ||
} | ||
@@ -912,0 +912,0 @@ |
{ | ||
"name": "bunyan", | ||
"version": "2.0.3", | ||
"version": "2.0.4", | ||
"description": "a JSON logging library for node.js services", | ||
@@ -25,2 +25,6 @@ "author": "Trent Mick <trentm@gmail.com> (http://trentm.com)", | ||
"license": "MIT", | ||
"files": [ | ||
"bin", | ||
"lib" | ||
], | ||
"dependencies": { | ||
@@ -36,3 +40,3 @@ "exeunt": "1.1.0" | ||
"safe-json-stringify": "~1", | ||
"moment": "^2.10.6" | ||
"moment": "^2.19.3" | ||
}, | ||
@@ -47,4 +51,5 @@ "devDependencies": { | ||
"scripts": { | ||
"test": "make test" | ||
"check": "make check", | ||
"test": "nodeunit test/*.test.js # skip dtrace tests" | ||
} | ||
} |
@@ -97,3 +97,9 @@ [![npm version](https://img.shields.io/npm/v/bunyan.svg?style=flat)](https://www.npmjs.com/package/bunyan) | ||
**Tip**: Installing without optional dependencies can dramatically reduce | ||
bunyan's install size. **dtrace-provider** is used for dtrace features, | ||
**mv** is used for RotatingFileStream, and **moment** is used for local time. | ||
If you don't need these features, consider installing with the | ||
`--no-optional` flag. | ||
# Features | ||
@@ -415,3 +421,3 @@ | ||
`log.info`, `log.debug`, etc. call. This means a poorly written serializer | ||
function can case side-effects. Logging shouldn't do that. Here are a few | ||
function can cause side-effects. Logging shouldn't do that. Here are a few | ||
rules and best practices for serializer functions: | ||
@@ -422,3 +428,3 @@ | ||
bunyan will (a) write an ugly message on stderr (along with the traceback), | ||
and (b) the field in the log record will be replace with a short error message. | ||
and (b) the field in the log record will be replaced with a short error message. | ||
For example: | ||
@@ -445,3 +451,3 @@ | ||
- A serializer function *should be defensive*. In my experience it is common to | ||
- A serializer function *should be defensive*. In my experience, it is common to | ||
set a serializer in an app, say for field name "foo", and then accidentally | ||
@@ -656,3 +662,3 @@ have a log line that passes a "foo" that is undefined, or null, or of some | ||
You can specify your hostname at Logger creation or it will be retrieved | ||
vi `os.hostname()`. | ||
via `os.hostname()`. | ||
- `pid`: Required. Integer. Filled in automatically at Logger creation. | ||
@@ -734,3 +740,3 @@ - `time`: Required. String. Added by Bunyan. Can be overridden. | ||
- Some mechanism to calculate response latency. "restify" users will have | ||
a "X-Response-Time" header. A `latency` custom field would be fine. | ||
an "X-Response-Time" header. A `latency` custom field would be fine. | ||
- `req.body`: If you know that request bodies are small (common in APIs, | ||
@@ -763,3 +769,3 @@ for example), then logging the request body is good. | ||
For convenience, if there is only one stream, it can specified with the | ||
For convenience, if there is only one stream, it can be specified with the | ||
"stream" and "level" options (internally converted to a `Logger.streams`). | ||
@@ -1070,3 +1076,3 @@ | ||
like `logrotate` on Linux or `logadm` on SmartOS/Illumos. In those cases, unless | ||
your are ensuring "copy and truncate" semantics (via `copytruncate` with | ||
you are ensuring "copy and truncate" semantics (via `copytruncate` with | ||
logrotate or `-c` with logadm) then the fd for your 'file' stream will change. | ||
@@ -1073,0 +1079,0 @@ You can tell bunyan to reopen the file stream with code like this in your |
Sorry, the diff of this file is not supported yet
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
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
1412
199934
6