Skip to content

Commit

Permalink
update readme and some dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
hiro5id committed May 26, 2023
1 parent 6c0eee8 commit 5537213
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 26 deletions.
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,16 @@ so that it can be easily parsed by tool such as LogDNA.
## Features

- The order of parameters or number of parameters don't matter, it figures out how to log it.
- Handles circular references
- Automatically add a date stamp in UTC to every log.
- Handles circular references when encountering JSON objects that contain such references.
- Automatically include informative details in every log entry such as:
- `@timestamp` - date stamp in UTC of when the log was generated.
- `@logCallStack` - show the precise location of console.log execution, eliminating the need to manually search for the source of the log in the code.
- `@filename` - show what file the console.log is generated in
- `@packageName` - show what package the console.log happened in, for example in a situation when a project is made up of multiple packages.
- Automatically parse stack traces and format them into a single line for for easy parsing in log management software such as LogDNA.
- Log extra context if passed in.
- Won't crash out and cause the application to stop, if there is a problem with logger, instead try to fall back to original console.log, output what is possible and continue.
- Logging is done in a non awaiting promise so that we yield to other processing while logging
- Logs via error level when message contains the word "error" to properly flag errors even if a mistake is made using the wrong console.info instead of console.error.
- Hanldes logging extra content if passed in.
- This system gracefully handles logger issues, seamlessly falling back to the original console.log function to prevent application crashes. It prioritizes outputting as much relevant information as possible while ensuring uninterrupted execution.
- Logging is done in a non awaiting promise so that we yield to other processing while logging.
- Optional support for colored JSON output. Example:
![colorized example](docs/images/colors_example.png)

Expand Down
101 changes: 83 additions & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"@types/chai": "^4.2.19",
"@types/cheerio": "^0.22.29",
"@types/mocha": "^8.2.2",
"@types/node": "^16.7.10",
"@types/node": "^20.2.5",
"@types/request-promise": "^4.1.47",
"@types/rimraf": "^3.0.0",
"@types/sinon": "^10.0.2",
Expand All @@ -74,7 +74,7 @@
"request-promise": "^4.2.6",
"rimraf": "^3.0.2",
"sinon": "^11.1.1",
"ts-node": "^10.0.0",
"ts-node": "^10.9.1",
"tslint": "^6.1.3",
"tslint-config-prettier": "^1.18.0",
"typescript": "^4.4.2"
Expand Down

0 comments on commit 5537213

Please sign in to comment.