English
Fx.log
About 519 wordsAbout 2 min
2026-01-09
Fx.log is used to record system runtime logs and debugging information.
Table of Contents
Summary
The overview of this document is as follows: Used to record runtime logs, warnings, errors, and debug information.
Function Categories
Log Module
Used to record runtime logs, warnings, errors, and debug information.
| Method Name | Description | Syntax |
|---|---|---|
| info | Runtime log | Fx.log.info(...) |
| warn | Runtime log | Fx.log.warn(...) |
| error | Runtime log | Fx.log.error(...) |
| debug | Debug log | Fx.log.debug(...) |
| lap | Time consumption statistics | Fx.log.lap(...) |
info
Function: Runtime log.
Syntax: Fx.log.info(Object data)
Request parameters:
| Parameter Name | Type | Description | Required |
|---|---|---|---|
| data | Object | Log data to be recorded | Y |
Example:
log.info(' Hello fxiaoke ')Notice:
- The info, warn, and error levels can record up to 400 lines in total.
warn
Function: Runtime log.
Syntax: Fx.log.warn(Object data)
Request parameters:
| Parameter Name | Type | Description | Required |
|---|---|---|---|
| data | Object | Log data to be recorded | Y |
Example:
log.warn(' Hello fxiaoke ')Notice:
- The info, warn, and error levels can record up to 400 lines in total.
error
Function: Runtime log.
Syntax: Fx.log.error(Object data)
Request parameters:
| Parameter Name | Type | Description | Required |
|---|---|---|---|
| data | Object | Log data to be recorded | Y |
Example:
log.error(' Hello fxiaoke ')Notice:
- The info, warn, and error levels can record up to 400 lines in total.
debug
Function: Debug log. It is only output in the debug window and is not recorded in runtime logs.
Syntax: Fx.log.debug(Object data)
Request parameters:
| Parameter Name | Type | Description | Required |
|---|---|---|---|
| data | Object | Log data to be recorded | Y |
Example:
log.debug(' Hello fxiaoke ')lap
Function: Time consumption statistics for each step. Effective only in debug mode.
Syntax: Fx.log.lap(String step)
Request parameters:
| Parameter Name | Type | Description | Required |
|---|---|---|---|
| step | String | Statistical step | Y |
Example:
log.lap('createObject-AccountObj')Changelog
| Version | Date | Changes | Author |
|---|---|---|---|
| v1.0 | 2026-05-19 | Initial version |
Background
This document describes the related API features and usage methods to help developers quickly integrate the relevant capabilities.
Applicable Scenarios
- Business scenario integration
- Data processing and synchronization
- System integration and extension
Prerequisites
- Access to Fxiaoke Open Platform
- Application authorization and configuration completed
- Basic knowledge of the relevant business domain
Steps
Please refer to the detailed instructions for each API.
Notes
- Ensure prerequisites are met before calling APIs
- Pay attention to API call frequency limits
- Refer to error code documentation for exception handling
Compatibility note: This version currently has no deprecated or compatibility notes.
