mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 10:37:32 +00:00
docs: log module for actions (#7448)
* docs: log module for actions * Update modules.md --------- Co-authored-by: Livio Spring <livio.a@gmail.com>
This commit is contained in:
@@ -52,6 +52,40 @@ The object has the following fields and methods:
|
|||||||
- `text()` *string*
|
- `text()` *string*
|
||||||
Returns the body
|
Returns the body
|
||||||
|
|
||||||
|
## Log
|
||||||
|
|
||||||
|
The log module provides you with the functionality to log to stdout.
|
||||||
|
|
||||||
|
### Import
|
||||||
|
|
||||||
|
```js
|
||||||
|
let logger = require("zitadel/log")
|
||||||
|
```
|
||||||
|
|
||||||
|
### `log()`, `warn()`, `error()` function
|
||||||
|
|
||||||
|
The logger offers three distinct log levels (info, warn, and error) to effectively communicate messages based on their severity, enhancing debugging and troubleshooting efficiency.
|
||||||
|
Use the function that reflects your log level.
|
||||||
|
|
||||||
|
- log()
|
||||||
|
- warn()
|
||||||
|
- error()
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```js
|
||||||
|
logger.info("This is an info log.")
|
||||||
|
|
||||||
|
logger.warn("This is a warn log.")
|
||||||
|
|
||||||
|
logger.error("This is an error log.")
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
- `msg` *string*
|
||||||
|
The message you want to print out.
|
||||||
|
|
||||||
## UUID
|
## UUID
|
||||||
|
|
||||||
This module provides functionality to generate a UUID
|
This module provides functionality to generate a UUID
|
||||||
|
Reference in New Issue
Block a user