Permalink
Browse files

fix winston logger

  • Loading branch information...
1 parent 02dc493 commit 5b6281eb100cf2b441d3a29be3dc24dc17e890c3 @olivoil committed Dec 6, 2011
Showing with 14,462 additions and 5 deletions.
  1. +25 −0 Makefile
  2. +8 −0 README
  3. +1 −2 app/app.js
  4. +1 −0 log/development.log
  5. +3 −0 node_modules/underscore/.npmignore
  6. +22 −0 node_modules/underscore/LICENSE
  7. +19 −0 node_modules/underscore/README
  8. +1,759 −0 node_modules/underscore/index.html
  9. +1 −0 node_modules/underscore/index.js
  10. +12 −0 node_modules/underscore/package.json
  11. +30 −0 node_modules/underscore/underscore-min.js
  12. +977 −0 node_modules/underscore/underscore.js
  13. +6 −0 node_modules/winston/.gitignore
  14. +10 −0 node_modules/winston/.travis.yml
  15. +19 −0 node_modules/winston/LICENSE
  16. +690 −0 node_modules/winston/README.md
  17. +194 −0 node_modules/winston/docs/docco.css
  18. +86 −0 node_modules/winston/docs/winston.html
  19. +140 −0 node_modules/winston/docs/winston/common.html
  20. +37 −0 node_modules/winston/docs/winston/config.html
  21. +37 −0 node_modules/winston/docs/winston/config/cli-config.html
  22. +29 −0 node_modules/winston/docs/winston/config/npm-config.html
  23. +33 −0 node_modules/winston/docs/winston/config/syslog-config.html
  24. +56 −0 node_modules/winston/docs/winston/exception.html
  25. +344 −0 node_modules/winston/docs/winston/logger.html
  26. +29 −0 node_modules/winston/docs/winston/transports.html
  27. +59 −0 node_modules/winston/docs/winston/transports/console.html
  28. +84 −0 node_modules/winston/docs/winston/transports/couchdb.html
  29. +211 −0 node_modules/winston/docs/winston/transports/file.html
  30. +118 −0 node_modules/winston/docs/winston/transports/loggly.html
  31. +50 −0 node_modules/winston/docs/winston/transports/transport.html
  32. +82 −0 node_modules/winston/docs/winston/transports/webhook.html
  33. +18 −0 node_modules/winston/examples/couchdb.js
  34. +17 −0 node_modules/winston/examples/webhook-post.js
  35. +143 −0 node_modules/winston/lib/winston.js
  36. +233 −0 node_modules/winston/lib/winston/common.js
  37. +45 −0 node_modules/winston/lib/winston/config.js
  38. +35 −0 node_modules/winston/lib/winston/config/cli-config.js
  39. +27 −0 node_modules/winston/lib/winston/config/npm-config.js
  40. +31 −0 node_modules/winston/lib/winston/config/syslog-config.js
  41. +100 −0 node_modules/winston/lib/winston/container.js
  42. +55 −0 node_modules/winston/lib/winston/exception.js
  43. +473 −0 node_modules/winston/lib/winston/logger.js
  44. +29 −0 node_modules/winston/lib/winston/transports.js
  45. +83 −0 node_modules/winston/lib/winston/transports/console.js
  46. +122 −0 node_modules/winston/lib/winston/transports/couchdb.js
  47. +332 −0 node_modules/winston/lib/winston/transports/file.js
  48. +161 −0 node_modules/winston/lib/winston/transports/loggly.js
  49. +57 −0 node_modules/winston/lib/winston/transports/transport.js
  50. +136 −0 node_modules/winston/lib/winston/transports/webhook.js
  51. +29 −0 node_modules/winston/package.json
  52. +40 −0 node_modules/winston/test/cli-test.js
  53. +99 −0 node_modules/winston/test/container-test.js
  54. +62 −0 node_modules/winston/test/custom-timestamp-test.js
  55. +46 −0 node_modules/winston/test/exception-test.js
  56. 0 node_modules/winston/test/fixtures/.gitkeep
  57. +13 −0 node_modules/winston/test/fixtures/keys/agent2-cert.pem
  58. +9 −0 node_modules/winston/test/fixtures/keys/agent2-key.pem
  59. 0 node_modules/winston/test/fixtures/logs/.gitkeep
  60. +21 −0 node_modules/winston/test/fixtures/scripts/default-exceptions.js
  61. +25 −0 node_modules/winston/test/fixtures/scripts/exit-on-error.js
  62. +25 −0 node_modules/winston/test/fixtures/scripts/log-exceptions.js
  63. +26 −0 node_modules/winston/test/fixtures/scripts/unhandle-exceptions.js
  64. +179 −0 node_modules/winston/test/helpers.js
  65. +58 −0 node_modules/winston/test/log-exception-test.js
  66. +184 −0 node_modules/winston/test/logger-test.js
  67. +39 −0 node_modules/winston/test/transports/console-test.js
  68. +47 −0 node_modules/winston/test/transports/couchdb-test.js
  69. +102 −0 node_modules/winston/test/transports/file-maxfiles-test.js
  70. +82 −0 node_modules/winston/test/transports/file-maxsize-test.js
  71. +50 −0 node_modules/winston/test/transports/file-test.js
  72. +61 −0 node_modules/winston/test/transports/loggly-test.js
  73. +119 −0 node_modules/winston/test/transports/webhook-test.js
  74. +100 −0 node_modules/winston/test/winston-test.js
  75. +19 −3 server.js
  76. +12 −0 test/integration/browser.js
  77. +10 −0 test/integration/homePage.test.js
  78. +54 −0 test/unit/client/SpecRunner.html
  79. +9 −0 test/unit/client/helpers/SpecHelper.js
  80. +2,821 −0 test/unit/client/helpers/sinon-1.1.1.js
  81. +20 −0 test/unit/client/lib/jasmine-1.1.0.rc1/MIT.LICENSE
  82. +190 −0 test/unit/client/lib/jasmine-1.1.0.rc1/jasmine-html.js
  83. +166 −0 test/unit/client/lib/jasmine-1.1.0.rc1/jasmine.css
  84. +2,476 −0 test/unit/client/lib/jasmine-1.1.0.rc1/jasmine.js
  85. BIN test/unit/client/lib/jasmine-1.1.0.rc1/jasmine_favicon.png
View
@@ -0,0 +1,25 @@
+MOCHA_REPORTER = spec
+UNIT_TESTS = $(shell find test/unit/server -name "*.test.js")
+INTEGRATION_TESTS = $(shell find test/integration/ -name "*.test.js")
+
+cucumber:
+ @NODE_ENV=test ./node_modules/.bin/jasmine \
+ --require ['test/features']
+
+test-integration:
+
+test-performance:
+
+test-unit-server:
+ @NODE_ENV=test ./node_modules/.bin/mocha \
+ --require should \
+ --require sinon \
+ --reporter $(MOCHA_REPORTER) \
+ --slow 20 \
+ --growl \
+ $(UNIT_TESTS)
+
+test-unit-client:
+ open test/unit/client/SpecRunner.html
+
+.PHONY: cucumber test-integration test-performance test-unit-server test-unit-client
View
8 README
@@ -0,0 +1,8 @@
+### Example app showing how to test an express application
+
+TODO:
+1. Add cucumber.js for integration testing
+2. Update Makefile to run tests
+
+ALSO:
++ Add a browser interface where you can check: integration tests, unit tests, client tests, performance tests, test coverage report
View
@@ -40,8 +40,7 @@ app.run = function(config){
// Listen
app.listen(config.port, function(){
- config.logger.log('http', "Express server listening on port %d in %s mode", app.address().port, app.settings.env);
- config.logger.log('debug', app.settings);
+ config.logger.http("Express server listening on port " + app.address().port + " in " + app.settings.env + " mode");
});
return app;
View
@@ -0,0 +1 @@
+{"level":"http","message":"Express server listening on port 3000 in development mode"}

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 5b6281e

Please sign in to comment.