Built-in Module
Prints output to console with optional log levels and colors.
Configuration
| Parameter | Type | Required | Description |
|---|---|---|---|
| message | string | Yes | Message to print |
| level | string | No | Log level: info, debug, error, warning (default: info) |
| format | string | No | Output format: text, json (default: text) |
Log Level Colors
infoGreendebugGrayerrorRedwarningYellowExamples
Basic Info Message
json
{
"id": "log_output",
"type": "print",
"config": {
"message": "Workflow started successfully",
"level": "info"
}
}Debug with Variable
json
{
"id": "debug_vars",
"type": "print",
"config": {
"message": "Environment: {{env.CI_ENVIRONMENT_NAME}}",
"level": "debug"
}
}Error Message
json
{
"id": "error_step",
"type": "print",
"config": {
"message": "Deployment failed: {{steps.deploy.error}}",
"level": "error"
},
"depends_on": ["deploy"]
}JSON Format Output
json
{
"id": "json_output",
"type": "print",
"config": {
"message": "{"status": "complete", "steps": 5}",
"level": "info",
"format": "json"
}
}Complete Workflow Example
json
{
"name": "print-demo",
"steps": [
{
"id": "start",
"type": "print",
"config": {
"message": "Starting workflow...",
"level": "info"
}
},
{
"id": "debug_info",
"type": "print",
"config": {
"message": "Debug: CI_PROJECT_ID = {{env.CI_PROJECT_ID}}",
"level": "debug"
},
"depends_on": ["start"]
},
{
"id": "warning_check",
"type": "print",
"config": {
"message": "Warning: Skipping tests in production mode",
"level": "warning"
},
"depends_on": ["debug_info"]
},
{
"id": "complete",
"type": "print",
"config": {
"message": "Workflow completed!",
"level": "info"
},
"depends_on": ["warning_check"]
}
]
}