Skip to content

Commit

Permalink
docs: fix typo in README.md (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
Link1515 authored Dec 17, 2024
1 parent 4b85982 commit 0a9d9d6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ A lightweight and more JavaScript logger for NodeJS and browsers.

`node-color-log` is a logger package for NodeJS and browsers. It provides more functions than the origin `console.log`. You can log text with colorful fonts and colorful backgrounds. Also, it has 4 levels log, including `debug`, `info`, `warn` and `error`. Give you a much better experience while developing JavaScript projects.

Winston and Pino are famous loggers for JaveScript, but they are too heavy and fancy. Sometimes we just want to have a simple logger, and don't want to spend time learning a fancy library. Then, `node-color-log` is your best choice.
Winston and Pino are famous loggers for JavaScript, but they are too heavy and fancy. Sometimes we just want to have a simple logger, and don't want to spend time learning a fancy library. Then, `node-color-log` is your best choice.

## Demo

Expand Down Expand Up @@ -67,7 +67,7 @@ logger.log(message)
logger.color('red').bgColor('blue')
.bold().italic().dim().reverse().underscore().strikethrough()
.log(message);
// use `append`` to joint contents, and use `log` to print out at the end
// use `append` to joint contents, and use `log` to print out at the end
logger.color('red').bold().append('message_style_1')
.bgColor('white').italic().append('message_style_2')
.strikethrough().log('message_style_3');
Expand All @@ -85,7 +85,7 @@ logger.log(obj1, arr2, str3);

You can redirect the logs to the stream.

for example, you can write the log into the file:
For example, you can write the log into the file:

```js
fileStream = fs.createWriteStream('test.log'),
Expand All @@ -97,7 +97,7 @@ logger.error("hello", "world");
fileStream.close()
```

you can use `less -R test.log` to see the result.
You can use `less -R test.log` to see the result.

### `fontColorLog()`, `bgColorLog()`, `colorLog()`

Expand Down

0 comments on commit 0a9d9d6

Please sign in to comment.