Skip to content

Commit

Permalink
Example formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Yamboy1 committed May 18, 2020
1 parent 56b5cc4 commit 64118c6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions examples/complex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,14 @@ import {

const logger = createLogger({
minimumLevel: LogLevel.INFO,
sinks: [consoleSink] // This is the default, but shown here for completeness
});
sinks: [consoleSink], // This is the default, but shown here for completeness
});

logger.debug("Debug"); // Ignored due to the minimumLevel
logger.info("This is {type} logging in {program}", "Structured", "Deno");
logger.warning("Numbers work: {number} as well as arrays: {arr}", 1, ["a","b","c"]);

// It doesn't matter what these variables are called,
const num = 1;
const array = ["a", "b", "c"];

logger.warning("Numbers work: {number} as well as arrays: {arr}", num, array);
2 changes: 1 addition & 1 deletion examples/simple.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ logger.debug("Debug");
logger.info("Info");
logger.warning("Warning");
logger.error("Error");
logger.critical("Critical");
logger.critical("Critical");

0 comments on commit 64118c6

Please sign in to comment.