Skip to content

Commit

Permalink
Make defaults static, rename private properties, update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
eartharoid committed Nov 16, 2023
1 parent 9ebcafd commit 2fe09b7
Show file tree
Hide file tree
Showing 6 changed files with 347 additions and 358 deletions.
14 changes: 14 additions & 0 deletions docs/customisation.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Customisation

Options can be set on initialisation, but are not required.
You can also use the `options` setter to set options after initialisation.
The object will be merged deeply with the existing (or default) options.

```js
log.error.http('this will throw an error');
log.options = {
// in this example only `namespaces` is modified,
// so `levels` and `transports` are preserved from existing/default options
namespaces: ['http']
};
log.success.http('this works');
```

## Logger options

??? summary "Defaults"
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "leekslazylogger",
"version": "5.0.2",
"version": "6.0.0",
"description": "An easy-to-use and lightweight logger for Node.js with colours, timestamps, and files.",
"main": "dist/",
"types": "types/index.d.ts",
Expand Down Expand Up @@ -56,13 +56,13 @@
"leeks.js": "^0.3.0"
},
"devDependencies": {
"@types/node": "^16.10.2",
"@typescript-eslint/eslint-plugin": "^4.28.1",
"@typescript-eslint/parser": "^4.28.1",
"@types/node": "^20.9.0",
"@typescript-eslint/eslint-plugin": "^6.11.0",
"@typescript-eslint/parser": "^6.11.0",
"del-cli": "^4.0.1",
"eslint": "^7.32.0",
"eslint": "^8.53.0",
"ts-node": "^10.7.0",
"tsc-watch": "^4.6.2",
"typescript": "^4.5.5"
"typescript": "^5.2.2"
}
}
Loading

0 comments on commit 2fe09b7

Please sign in to comment.