diff --git a/.gitignore b/.gitignore index f371022..3de30f0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ /tmp -/npm-debug.log /node_modules *.log +!/test/corpus/*.log diff --git a/CHANGES.md b/CHANGES.md index 0c1b247..1572251 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,7 +2,8 @@ ## bunyan 0.8.1 (not yet released) -(nothing yet) +- Add test/corpus/*.log files (accidentally excluded) so that test suite + works(!). ## bunyan 0.8.0 diff --git a/test/corpus/all.log b/test/corpus/all.log new file mode 100644 index 0000000..5d59151 --- /dev/null +++ b/test/corpus/all.log @@ -0,0 +1,20 @@ +# levels +{"name":"myservice","pid":123,"hostname":"example.com","level":10,"msg":"My message","time":"2012-02-08T22:56:50.856Z","v":0} +{"name":"myservice","pid":123,"hostname":"example.com","level":20,"msg":"My message","time":"2012-02-08T22:56:51.856Z","v":0} +{"name":"myservice","pid":123,"hostname":"example.com","level":30,"msg":"My message","time":"2012-02-08T22:56:52.856Z","v":0} +{"name":"myservice","pid":123,"hostname":"example.com","level":40,"msg":"My message","time":"2012-02-08T22:56:53.856Z","v":0} +{"name":"myservice","pid":123,"hostname":"example.com","level":50,"msg":"My message","time":"2012-02-08T22:56:54.856Z","v":0} +{"name":"myservice","pid":123,"hostname":"example.com","level":55,"msg":"My message","time":"2012-02-08T22:56:55.856Z","v":0} +{"name":"myservice","pid":123,"hostname":"example.com","level":60,"msg":"My message","time":"2012-02-08T22:56:56.856Z","v":0} + +# extra fields +{"name":"myservice","pid":123,"hostname":"example.com","level":30,"one":"short","msg":"My message","time":"2012-02-08T22:56:52.856Z","v":0} +{"name":"myservice","pid":123,"hostname":"example.com","level":30,"two":"short with space","msg":"My message","time":"2012-02-08T22:56:52.856Z","v":0} +{"name":"myservice","pid":123,"hostname":"example.com","level":30,"three":"multi\nline","msg":"My message","time":"2012-02-08T22:56:52.856Z","v":0} +{"name":"myservice","pid":123,"hostname":"example.com","level":30,"four":"over 50 chars long long long long long long long long long","msg":"My message","time":"2012-02-08T22:56:52.856Z","v":0} +{"name":"myservice","pid":123,"hostname":"example.com","level":30,"five":{"a": "json object"},"msg":"My message","time":"2012-02-08T22:56:52.856Z","v":0} +{"name":"myservice","pid":123,"hostname":"example.com","level":30,"six":["a", "json", "array"],"msg":"My message","time":"2012-02-08T22:56:52.856Z","v":0} + +# bogus +not a JSON line +{"hi": "there"} diff --git a/test/corpus/bogus.log b/test/corpus/bogus.log new file mode 100644 index 0000000..1c9e5fd --- /dev/null +++ b/test/corpus/bogus.log @@ -0,0 +1,2 @@ +not a JSON line +{"hi": "there"} diff --git a/test/corpus/extrafield.log b/test/corpus/extrafield.log new file mode 100644 index 0000000..aac64b9 --- /dev/null +++ b/test/corpus/extrafield.log @@ -0,0 +1 @@ +{"name":"myservice","pid":123,"hostname":"example.com","level":30,"extra":"field","msg":"My message","time":"2012-02-08T22:56:52.856Z","v":0} diff --git a/test/corpus/simple.log b/test/corpus/simple.log new file mode 100644 index 0000000..ebccc0d --- /dev/null +++ b/test/corpus/simple.log @@ -0,0 +1 @@ +{"name":"myservice","pid":123,"hostname":"example.com","level":30,"msg":"My message","time":"2012-02-08T22:56:52.856Z","v":0}