You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**`enabled`: Boolean (default: true)* - Set to `false` to completely disable weeb-logger
91
+
**`visual`: Boolean (default: true)* - Set to `false` to only disable visual container (logging on DevTools or node cmd will still work)
92
+
**`formatStackTrace`: Boolean (default: true)* - Uses [stacktrace.js](https://github.com/stacktracejs/stacktrace.js) to format error stacktraces when the log message is an instance of `Error`. This way stack traces will show original files rather than bundled files. It makes HTTP requests to sourcemaps.
Shows log with a <spanstyle="color:#ba1e18;">*red*</span> label. Shows stacktrace on DevTools and if the message is an instance of `Error` object it will also show stack trace on the visual container.
Shows log with a <spanstyle="color:#993d99;">*purple*</span> label.
120
+
121
+
#### `logger.clear()` => void
122
+
Clears the log container and DevTools console screen.
105
123
106
124
## Testing
107
125
@@ -117,7 +135,8 @@ Please make sure all tests pass before submiting a PR
117
135
## Roadmap
118
136
Would love Pull requests that build towards these objectives and even ideas for new objectives :3
119
137
-[x]~~Decrease package size (As waifu images increase, we'll need to store them on a CDN or something like that)~~ Solved by using GitHub URL to the raw image LOL
120
-
-[x] Configure ESLint
138
+
-[x] Configure ESLint
139
+
-[x] Improve README.md
121
140
-[ ] Tests
122
141
-[ ] Resize (aparently jest-dom doesn't support getting element dimensions)
123
142
-[ ] !isNode (maybe find another way to determine if environment is nodejs or browser other than ```typeof process === 'object' && `${process}\` === '[object process]')```
@@ -134,7 +153,8 @@ Would love Pull requests that build towards these objectives and even ideas for
134
153
|[Node.js](https://nodejs.org/en)| Node.js is a Javascript runtime build on Chrome`s V8 JavaScript |
135
154
|[Jest](https://jestjs.io/)| Jest is a JavaScript framework for testing |
136
155
|[Typescript](https://www.typescriptlang.org)| Typescript extends JavaScript by adding types to the language |
137
-
|[Chalk](https://github.com/chalk/chalk)| Chalk is a nodejs dependency for terminal string |
156
+
|[Chalk](https://github.com/chalk/chalk)| Chalk is a Node.js dependency for terminal string |
157
+
|[stacktrace.js](https://github.com/stacktracejs/stacktrace.js)| stacktrace.js is a Node.js module for formatting JavaScript stack traces in all browsers |
138
158
|[Canvas](https://developer.mozilla.org/pt-BR/docs/Web/API/Canvas_API)| Canvas provides a means for drawing graphics via JavaScript and the HTML element |
0 commit comments