Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: trentm/node-bunyan
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: b3f72bfb7a07b107ada2b7d3c1648c3559a2396f
Choose a base ref
...
head repository: trentm/node-bunyan
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: ea21d75f548373f29bb772b15faeb83e87089746
Choose a head ref

Commits on Feb 29, 2016

  1. bumpver for subsequent work

    trentm committed Feb 29, 2016
    Copy the full SHA
    bb1ab77 View commit details

Commits on Mar 7, 2016

  1. rotating-file: auto rotate file on startup if needed

    Fixes #239
    Paul Milham authored and trentm committed Mar 7, 2016
    Copy the full SHA
    46d2be4 View commit details
  2. Copy the full SHA
    69e7c7f View commit details
  3. Copy the full SHA
    97026eb View commit details

Commits on Mar 17, 2016

  1. Fix bunyan -p ... (i.e. DTrace integration) on node 4.x and 5.x

    This never worked with node >0.x because of faulty logic determining
    `nodeSpawnSupportsStdio` -- attempting to compare with, e.g.,
    `Number('v1')`.
    
    Fixes #370
    trentm committed Mar 17, 2016
    Copy the full SHA
    778d0f7 View commit details
  2. 1.8.0

    trentm committed Mar 17, 2016
    Copy the full SHA
    dcf23b4 View commit details
  3. bumpver for subsequent work

    trentm committed Mar 17, 2016
    Copy the full SHA
    ffc6355 View commit details

Commits on Apr 16, 2016

  1. Fix typo in README.md

    defualt -> default
    seoker committed Apr 16, 2016
    Copy the full SHA
    306d8e1 View commit details

Commits on Apr 21, 2016

  1. rotate() OR _setupNextRot() on start

    psfrankie authored and trentm committed Apr 21, 2016
    Copy the full SHA
    084f38c View commit details
  2. Copy the full SHA
    a094cee View commit details
  3. Copy the full SHA
    dfa12b2 View commit details
  4. Add example for #394

    trentm committed Apr 21, 2016
    Copy the full SHA
    4744d63 View commit details
  5. 1.8.1

    trentm committed Apr 21, 2016
    Copy the full SHA
    63cc17f View commit details
  6. bumpver for subsequent work

    trentm committed Apr 21, 2016
    Copy the full SHA
    cbfaa9a View commit details

Commits on May 17, 2016

  1. TODO

    trentm committed May 17, 2016
    Copy the full SHA
    32e4e2f View commit details

Commits on Jul 5, 2016

  1. Copy the full SHA
    7c80e29 View commit details

Commits on Aug 26, 2016

  1. Copy the full SHA
    876d358 View commit details
  2. Copy the full SHA
    0974231 View commit details
  3. Add table of contents to README.md (#429)

    ad-si authored and trentm committed Aug 26, 2016
    Copy the full SHA
    61f8af9 View commit details
  4. Copy the full SHA
    604ff1e View commit details

Commits on Sep 17, 2016

  1. docs: Fix local CLI path (#438)

    MethodGrab authored and trentm committed Sep 17, 2016
    Copy the full SHA
    7300a18 View commit details

Commits on Oct 17, 2016

  1. test: test node v6, drop v5

    trentm committed Oct 17, 2016
    Copy the full SHA
    d6663a4 View commit details
  2. Copy the full SHA
    18bdda7 View commit details
  3. change 'make cutarelease' style to not do autocommits and version bum…

    …ping as part of releasing
    trentm committed Oct 17, 2016
    Copy the full SHA
    a41539b View commit details

Commits on Oct 18, 2016

  1. Copy the full SHA
    2390bf8 View commit details
  2. Copy the full SHA
    049f178 View commit details
  3. drop unnecessary check, because typeof(null) already is "object", e…

    …xcluded in the first guard
    trentm committed Oct 18, 2016
    Copy the full SHA
    06dbebd View commit details

Commits on Oct 25, 2016

  1. move 3rd-party list to wiki

    trentm committed Oct 25, 2016
    Copy the full SHA
    e0f0a5d View commit details
  2. v1.8.4; fix 'src' usage with node v7

    Fixes #454
    trentm committed Oct 25, 2016
    Copy the full SHA
    c04e843 View commit details

Commits on Nov 3, 2016

  1. Copy the full SHA
    4474c9a View commit details

Commits on Nov 8, 2016

  1. Fix typo. Fixes #378

    trentm committed Nov 8, 2016
    Copy the full SHA
    01cb08c View commit details
  2. Copy the full SHA
    e4b33d8 View commit details

Commits on Nov 14, 2016

  1. Copy the full SHA
    3cde7bc View commit details

Commits on Mar 3, 2017

  1. Copy the full SHA
    550ea90 View commit details
  2. authors update

    trentm committed Mar 3, 2017
    Copy the full SHA
    4b9df66 View commit details
  3. Don't throw errors in older versions of node/V8 that don't support th…

    …e Set object. (#485)
    
    Fixes #484.
    JustinMcConnell authored and trentm committed Mar 3, 2017
    Copy the full SHA
    55f8c9d View commit details
  4. 2
    Copy the full SHA
    907489d View commit details
  5. Copy the full SHA
    741bcae View commit details

Commits on Mar 4, 2017

  1. Added Travis CI integration

    Srokap authored and trentm committed Mar 4, 2017
    Copy the full SHA
    b74180c View commit details
  2. Copy the full SHA
    4a500c4 View commit details
  3. Copy the full SHA
    5c51dc2 View commit details
  4. Align the same filename of empty_shim in README

    empty-shim.js is not aligned with sample empty_shim below.
    
    Change the above one to become empty_shim.js
    thomas-lee authored and trentm committed Mar 4, 2017
    Copy the full SHA
    027cf5a View commit details
  5. Anonymise some functions to work around Safari bug

    Some Safari versions will error with a syntax error if a function has the same name as
    one of its parameter.
    Found the bug in safari included with iOS 9.3.5.
    Fixed for me with this patch.
    stribehou authored and trentm committed Mar 4, 2017
    Copy the full SHA
    2d535a6 View commit details
  6. example to log undefined vals (related to pull #473)

    Also, a changelog update for a recent change.
    trentm committed Mar 4, 2017
    Copy the full SHA
    4d46637 View commit details
  7. Copy the full SHA
    a778ea5 View commit details

Commits on Mar 6, 2017

  1. formatting

    trentm committed Mar 6, 2017
    Copy the full SHA
    b66571f View commit details

Commits on Mar 8, 2017

  1. Copy the full SHA
    b33b7e5 View commit details
  2. update readme toc

    trentm committed Mar 8, 2017
    Copy the full SHA
    f4fff7b View commit details

Commits on Mar 21, 2017

  1. fix(bin): don't ignore SIGINT

    Ignoring SIGINT can make the process interminable. The emitting node process should instead ignore EPIPE.
    
    Reverts #161, Fixes #246
    zbjornson authored and trentm committed Mar 21, 2017
    Copy the full SHA
    aff022b View commit details
  2. v1.8.9; changelog update for #409

    trentm committed Mar 21, 2017
    Copy the full SHA
    34f4469 View commit details
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -3,3 +3,4 @@
*.log
!/test/corpus/*.log
/*.tgz
/test/*.log.0
23 changes: 23 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
language: node_js

os:
- linux
- osx

env:
- SKIP_DTRACE=1

node_js:
- '0.10'
- '0.12'
- '4'
- '5'
- '6'
- 'node'


# Gives us faster boot time, see https://docs.travis-ci.com/user/ci-environment/
sudo: false

script:
- npm test
5 changes: 5 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -35,3 +35,8 @@ Alexander Ray (https://github.com/aray12)
Adam Lynch (https://github.com/adam-lynch)
Michael Nisi (https://github.com/michaelnisi)
Martijn Schrage (https://github.com/Oblosys)
Paul Milham (https://github.com/domrein)
Frankie O'Rourke (https://github.com/psfrankie)
Cody Mello (https://github.com/melloc)
Todd Whiteman (https://github.com/twhiteman)
Zach Bjornson (https://github.com/zbjornson)
110 changes: 110 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -5,6 +5,116 @@ Known issues:
- [issue #58] Can't install to a dir with spaces. This is [this node-gyp
bug](https://github.com/TooTallNate/node-gyp/issues/65).

## not yet released

(nothing yet)


## 1.8.13

- Fix a vulnerability from a crafted argument to 'bunyan -p ARG'

This was reported privately as:
https://hackerone.com/reports/902739
bunyan - RCE via insecure command formatting

Previous to this version the 'bunyan' CLI was not escaping a given argument
to the '-p' option before executing `ps -A -o pid,command | grep '$ARG'`
which could lead to unintended execution.

## 1.8.12

- [issue #444] Fix the `bunyan` CLI to not duplicate the "HTTP/1.1 ..." status
line when serializing a "res" field.


## 1.8.11

- [issue #504] The `bunyan` 1.x CLI adds a `Host: $client_req.address[:$client_req.port]`
header when rendering a `client_req` field in a log record. Fix that here to:
(a) not add it if `client_req.headers` already includes a host header; and
(b) not include the given `port` if it is 80 or 443 (*assuming* that is the
default port.
Note: `bunyan` 2.x CLI will stop adding this Host header because it is a guess
that can be wrong and misleading.


## 1.8.10

- Ensure that `bunyan` errors out if attempting to use `-p PID` and
file args at the same time.


## 1.8.9

- [pull #409, issue #246] Revert a change added to the `bunyan` CLI version
1.0.1 where `SIGINT` was ignored, such that Ctrl+C could not be used to
terminate bunyan. (By @zbjornson and @davepacheco.)
- [pull #469] Fix a strict mode (`"use strict;"`) error in some versions of
Safari.


## 1.8.8

- Fix breakage due to a silly last minute "fix 'make check'".


## 1.8.7

Note: *Bad release.* Use 1.8.8 or later.

- [issue #484] Fix breakage due to #474 in previous release.


## 1.8.6

Note: *Bad release.* Use 1.8.7 or later.

- [issue #474] Bunyan's `safeCycles` is too slow when logging large objects.


## 1.8.5

- [issue #401] Improved performance when using disabled log levels.


## 1.8.4

- [issue #454] Fix `src` usage with node v7.


## 1.8.3

- [issue #450] Fix `log.info(null)` crash that resulted from #426 in v1.8.2.


## 1.8.2

- [issue #449] Bump dtrace-provider dep to 0.7.0 to help avoid deprecation
warnings with node v6 in some cases.
- [issue #426] Ensure `log.info({err: err})` results in a "msg" value, just
like `log.info(err)`.


## 1.8.1

- [pull #386] Fix bad bug in rotation that could cause a crash with
error message "cannot start a rotation when already rotating"
(by Frankie O'Rourke). The bug was introduced in 1.8.0.


## 1.8.0

Note: *Bad release.* An addition in this release broke 'rotating-file' usage.
Use 1.8.1 or later.

- [issue #370] Fix `bunyan -p ...` (i.e. DTrace integration) on node
4.x and 5.x.
- [issue #329, pull #330] Update the 'rotating-file' stream to do a file
rotation on initialization if the mtime on the file path indicates the
last rotation time was missed -- i.e. if the app wasn't running at the
time. (by Paul Milham.)


## 1.7.1

55 changes: 40 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
@@ -35,25 +35,45 @@ all $(NODEUNIT):
.PHONY: versioncheck
versioncheck:
@echo version is: $(shell cat package.json | json version)
[[ `cat package.json | json version` == `grep '^## ' CHANGES.md | head -1 | awk '{print $$2}'` ]]
[[ `cat package.json | json version` == `grep '^## ' CHANGES.md | head -2 | tail -1 | awk '{print $$2}'` ]]
[[ `cat package.json | json version` == `grep '^var VERSION' bin/bunyan | awk -F"'" '{print $$2}'` ]]
[[ `cat package.json | json version` == `grep '^var VERSION' lib/bunyan.js | awk -F"'" '{print $$2}'` ]]
@echo Version check ok.

.PHONY: cutarelease
cutarelease: versioncheck check
[[ `git status | tail -n1 | cut -c1-17` == "nothing to commit" ]]
./tools/cutarelease.py -p bunyan -f package.json -f lib/bunyan.js -f bin/bunyan
cutarelease: check
[[ -z `git status --short` ]] # If this fails, the working dir is dirty.
@which json 2>/dev/null 1>/dev/null && \
ver=$(shell json -f package.json version) && \
name=$(shell json -f package.json name) && \
publishedVer=$(shell npm view -j $(shell json -f package.json name)@$(shell json -f package.json version) version 2>/dev/null) && \
if [[ -n "$$publishedVer" ]]; then \
echo "error: $$name@$$ver is already published to npm"; \
exit 1; \
fi && \
echo "** Are you sure you want to tag and publish $$name@$$ver to npm?" && \
echo "** Enter to continue, Ctrl+C to abort." && \
read
ver=$(shell cat package.json | json version) && \
date=$(shell date -u "+%Y-%m-%d") && \
git tag -a "$$ver" -m "version $$ver ($$date)" && \
git push --tags origin && \
npm publish

.PHONY: docs
docs:
docs: toc
@[[ `which ronn` ]] || (echo "No 'ronn' on your PATH. Install with 'gem install ronn'" && exit 2)
mkdir -p man/man1
ronn --style=toc --manual="bunyan manual" --date=$(shell git log -1 --pretty=format:%cd --date=short) --roff --html docs/bunyan.1.ronn
python -c 'import sys; h = open("docs/bunyan.1.html").read(); h = h.replace(".mp dt.flush {float:left;width:8ex}", ""); open("docs/bunyan.1.html", "w").write(h)'
python -c 'import sys; h = open("docs/bunyan.1.html").read(); h = h.replace("</body>", """<a href="https://github.com/trentm/node-bunyan"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub"></a></body>"""); open("docs/bunyan.1.html", "w").write(h)'
@echo "# test with 'man ./docs/bunyan.1' and 'open ./docs/bunyan.1.html'"

# Re-generate the README.md table of contents.
toc:
./node_modules/.bin/markdown-toc -i README.md


.PHONY: publish
publish:
mkdir -p tmp
@@ -82,16 +102,21 @@ test: $(NODEUNIT)

# Test will all node supported versions (presumes install locations I use on
# my machine -- "~/opt/node-VER"):
# Note: 'test10' is last so (if all is well) I end up with a binary
# dtrace-provider build for node 0.10 (my current version).
# Note: 'test4' is last so (if all is well) I end up with a binary
# dtrace-provider build for my current default node version.
.PHONY: testall
testall: test5 test4 test012 test010

.PHONY: test5
test5:
@echo "# Test node 5.x (with node `$(NODEOPT)/node-5/bin/node --version`)"
@$(NODEOPT)/node-5/bin/node --version | grep '^v5\.'
PATH="$(NODEOPT)/node-5/bin:$(PATH)" make distclean all test
testall: test7 test6 test012 test010 test4

.PHONY: test7
test7:
@echo "# Test node 7.x (with node `$(NODEOPT)/node-7/bin/node --version`)"
@$(NODEOPT)/node-7/bin/node --version | grep '^v7\.'
PATH="$(NODEOPT)/node-7/bin:$(PATH)" make distclean all test
.PHONY: test6
test6:
@echo "# Test node 6.x (with node `$(NODEOPT)/node-6/bin/node --version`)"
@$(NODEOPT)/node-6/bin/node --version | grep '^v6\.'
PATH="$(NODEOPT)/node-6/bin:$(PATH)" make distclean all test
.PHONY: test4
test4:
@echo "# Test node 4.x (with node `$(NODEOPT)/node-4/bin/node --version`)"
@@ -116,7 +141,7 @@ check-jsstyle: $(JSSTYLE_FILES)
./tools/jsstyle -o indent=4,doxygen,unparenthesized-return=0,blank-after-start-comment=0,leading-right-paren-ok=1 $(JSSTYLE_FILES)

.PHONY: check
check: check-jsstyle
check: check-jsstyle versioncheck
@echo "Check ok."

.PHONY: prepush
Loading