Variable
Static Public Summary | ||
public |
config(metadata_delimiter: String, append_metadata: boolean, debug_logger: Writable, timestamp_prefix: boolean): {"logger": *, "metadata_delimiter": string, "append_metadata": boolean, "debug_logger": *, "timestamp_prefix": *, ...userConfig: Object} The configuration options here are use throughout the timber library. |
Static Public
public config(metadata_delimiter: String, append_metadata: boolean, debug_logger: Writable, timestamp_prefix: boolean): {"logger": *, "metadata_delimiter": string, "append_metadata": boolean, "debug_logger": *, "timestamp_prefix": *, ...userConfig: Object} source
import config from 'timber/src/config.js'
The configuration options here are use throughout the timber library. Any of the values can be changed in two different ways:
Using your package.json
To configure timber from your package.json
, simply add a timber
object at the root level containing your desired overrides:
"timber": {
"capture_request_body": true,
"capture_response_body": true
},
Note: you cannot set the debug_logger
option from the package.json
.
This is because you must set it as a writeable stream.
Using inline overrides
You can also configure timber by overriding the config options inline:
const timber = require('timber');
timber.config.debug_logger = process.stdout;
Note: inline overrides will override any options you have set
in your package.json
file.