Skip to content

Commit

Permalink
adjust docs for log (denoland/deno#4984)
Browse files Browse the repository at this point in the history
  • Loading branch information
dream2023 authored and caspervonb committed Jan 31, 2021
1 parent 0caf9c4 commit a0175a0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions log/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ await log.setup({
handlers: {
console: new log.handlers.ConsoleHandler("DEBUG"),

file: new log.handlers.FileHandler(log.LogLevels.DEBUG, {
file: new log.handlers.FileHandler("WARNING", {
filename: "./log.txt",
// you can change format of output message using any keys in `LogRecord`
formatter: "{levelName} {msg}",
Expand All @@ -34,7 +34,7 @@ await log.setup({
},

tasks: {
level: log.LogLevels.ERROR,
level: "ERROR",
handlers: ["console"],
},
},
Expand All @@ -55,7 +55,7 @@ logger.error("buzz"); // log to `console`
// if you try to use a logger that hasn't been configured
// you're good to go, it gets created automatically with level set to 0
// so no message is logged
unknownLogger = log.getLogger("mystery");
const unknownLogger = log.getLogger("mystery");
unknownLogger.info("foobar"); // no-op
```

Expand Down

0 comments on commit a0175a0

Please sign in to comment.