Browse files

Try to use backticks correctly.

  • Loading branch information...
1 parent 5d2858f commit d2b3facefb4f640abe096dd01884fe1d8bdb34a9 @pquerna committed Mar 19, 2011
Showing with 7 additions and 1 deletion.
  1. +7 −1
@@ -8,21 +8,27 @@ Getting Started
If you had a file named like, "lib/foo/bar.js", at the top of it, you would put the following:
- var log = require('logmagic').local('');
+```var log = require('logmagic').local('');```
Then inside bar.js, you would just use the logger like any normal logger:
log.error("Accepts format strings too ${SOME_VAR}", {SOME_VAR: "myvalue"})
In any other part of your application, you can reconfigure the logging subsystem at runtime,
making it easy to change log levels for specific modules dynamically.
var logmagic = require('logmagic');
logmagic.registerSink("mysink", function(level, message) { console.log(message); });
/* Reconfigure all children of mylib to log all debug messages to your custom sink */
logmagic.route("mylib.*", logmagic.DEBUG, "mysink")
Builtin sinks include:
* Standard Out, Standard Error

0 comments on commit d2b3fac

Please sign in to comment.