Skip to content

Commit

Permalink
Make logging controllable for devs
Browse files Browse the repository at this point in the history
Fixes #144
  • Loading branch information
cwegrzyn committed Jun 7, 2024
1 parent 81d0639 commit 93d41c2
Show file tree
Hide file tree
Showing 23 changed files with 352 additions and 90 deletions.
21 changes: 21 additions & 0 deletions docs/Other Features/Debug Logging.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
By default, to comply with Obsidian plugin guidelines, the plugin logs relatively few messages to
the Javascript console.

If you are experience issues and/or you are developing the plugin, you may wish to increase the
verbosity of the logging. To do so, you can set the `logLevel` property on the API using the JS
console:

```javascript
IronVaultAPI.logLevel = "debug";
```

The level you set is stored in browser localStorage, so it is preserved across reloads.

Log levels follow the NPM standard and are:

- `error`
- `warn`
- `info` (default)
- `verbose`
- `debug`
- `silly`
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"tslib": "^2.6.2",
"typescript": "^5.4.5",
"typescript-eslint": "^7.10.0",
"winston": "^3.13.0",
"zod": "^3.23.8"
}
}
Loading

0 comments on commit 93d41c2

Please sign in to comment.