LogManager
The log manager instance, which can be obtained via Taro.getLogManager
.
How to Use
You can save up to 5 MB in log content. Old log content will be deleted if this threshold is exceeded.
You can use open-type="feedback"
of the button component to upload printed logs. Developers can view these logs via "Feedback Management" in the left-side menu on the Mini Program admin console.
By default, the base library writes the App and Page lifecycle functions and function calls under the wx namespace to the log.
Methods
debug
Writes the "debug" log.
(...args: any[]) => void
Property | Type | Description |
---|---|---|
args | any[] | The log can contain any number of entries, but the total size of the parameters of a single call cannot exceed 100 KB. |
API Support
API | WeChat Mini-Program | H5 | React Native |
---|---|---|---|
LogManager.debug | ✔️ |
info
Writes the "info" log.
(...args: any[]) => void
Property | Type | Description |
---|---|---|
args | any[] | The log can contain any number of entries, but the total size of the parameters of a single call cannot exceed 100 KB. |
API Support
API | WeChat Mini-Program | H5 | React Native |
---|---|---|---|
LogManager.info | ✔️ |
log
Writes the "log" log.
(...args: any[]) => void
Property | Type | Description |
---|---|---|
args | any[] | The log can contain any number of entries, but the total size of the parameters of a single call cannot exceed 100 KB. |
API Support
API | WeChat Mini-Program | H5 | React Native |
---|---|---|---|
LogManager.log | ✔️ |
warn
Writes the "warn" log.
(...args: any[]) => void
Property | Type | Description |
---|---|---|
args | any[] | The log can contain any number of entries, but the total size of the parameters of a single call cannot exceed 100 KB. |
API Support
API | WeChat Mini-Program | H5 | React Native |
---|---|---|---|
LogManager.warn | ✔️ |
API Support
API | WeChat Mini-Program | H5 | React Native |
---|---|---|---|
LogManager.debug | ✔️ | ||
LogManager.info | ✔️ | ||
LogManager.log | ✔️ | ||
LogManager.warn | ✔️ |