# LogManager wx.getLogManager(Object object)
Start from base library version 2.1.0. Please remaining backward compatible.
with Promise style call: Not supported
Mini Program plugin: Not supported
Gets the log manager object.
# parameter
# Object object
attribute | type | Default values | Required | Introductions | Minimum version |
---|---|---|---|---|---|
level | number | 0 | no | Takes a value of 0/A value of 0 means that the App 、Page Life cycle function and wx Namespace write to the log, a value of 1 does not. The default value is 0 | 2.3.2 |
# Return value
# LogManager
# sample code
const logger = wx.getLogManager({level: 1})
logger.log({str: 'hello world'}, 'basic log', 100, [1, 2, 3])
logger.info({str: 'hello world'}, 'info log', 100, [1, 2, 3])
logger.debug({str: 'hello world'}, 'debug log', 100, [1, 2, 3])
logger.warn({str: 'hello world'}, 'warn log', 100, [1, 2, 3])