Skip to content

Commit

Permalink
feat(logger): Additional internal logger options
Browse files Browse the repository at this point in the history
Add two new options to control the internal logger use to show
errors in the console.  First `disableInternalErrorLogger` to
disable the internal logger, second `internalErrorLoggerLevel`
to control the console level used, defaults to `console.error`

Semver: minor
  • Loading branch information
TerryMooreII committed Mar 27, 2024
1 parent 2f42857 commit f79fd80
Show file tree
Hide file tree
Showing 7 changed files with 601 additions and 228 deletions.
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -204,6 +204,8 @@ logdna.init(LOGDNA_INGESTION_KEY, {
| `disabled` | `false` | boolean | Disable the logger from sending logs |
| `debug` | `false` | boolean | When debug is `true`, `logdna.<log, error, warn, info, debug>` methods will log to both LogDNA and to the console. When `false` these methods will only send to LogDNA. |
| `hooks` | `{ }` | object | Add function to manipulate log message. [See hooks.](#hooks-option) |
| `disableInternalErrorLogger` | `false` | boolean | Disable internal errors from being shown in the console |
| `internalErrorLoggerLevel` | `'log', 'info', 'debug', 'warn', 'error'` | string | By default internal errors are shown as `console.error`, use this option to change to a different console level |

## `sampleRate` option

Expand Down

0 comments on commit f79fd80

Please sign in to comment.