Skip to content

Log statements in the python code are reported as error logs in Kestra flow #10792

@alphakilo7

Description

@alphakilo7

Describe the issue

Task type: io.kestra.plugin.scripts.python.Commands

The code in my docker image uses Python's native logger. Whenever the code logs something using the logger, they are shown as ERROR in Kestra and results overall status of WARNING for the specific execution.

The logger has no predictable behavior; some statements are shown as error whereas some as info as well.

Sample logs from the flow:

2025-08-19T15:04:11.501671Z INFO 2025-08-19T15:04:11.496Z - [core_etl.connectors] Removed line: 1762 - public boolean isInteger(RuleAuxMethodsInterfaceImpl iNode, String attrName) {
2025-08-19T15:04:11.501725Z INFO 2025-08-19T15:04:11.496Z - [core_etl.connectors] commit time difference in days---62
2025-08-19T15:04:11.501747Z INFO 2025-08-19T15:04:11.497Z - [core_etl.connectors] Removed line: 1763 - List<Object> inpArg;
2025-08-19T15:04:11.501762Z INFO 2025-08-19T15:04:11.497Z - [core_etl.connectors] commit time difference in days---62
2025-08-19T15:04:11.501780Z INFO 2025-08-19T15:04:11.497Z - [core_etl.connectors] Removed line: 1764 - boolean returnVal = false;
2025-08-19T15:04:11.501794Z INFO 2025-08-19T15:04:11.497Z - [core_etl.connectors] commit time difference in days---62
2025-08-19T15:04:11.501809Z INFO 2025-08-19T15:04:11.497Z - [core_etl.connectors] Removed line: 1765 - try {
2025-08-19T15:04:11.501823Z INFO 2025-08-19T15:04:11.497Z - [core_etl.connectors] commit time difference in days---62
2025-08-19T15:04:11.501839Z INFO 2025-08-19T15:04:11.497Z - [core_etl.connectors] Removed line: 1766 - Integer.parseInt(iNode.getAttribute(attrName));
2025-08-19T15:04:11.501853Z INFO 2025-08-19T15:04:11.498Z - [core_etl.connectors] commit time difference in days---62
2025-08-19T15:04:11.501867Z INFO 2025-08-19T15:04:11.498Z - [core_etl.connectors] Removed line: 1767 - returnVal = true;
2025-08-19T15:04:11.501881Z INFO 2025-08-19T15:04:11.498Z - [core_etl.connectors] commit time difference in days---62
2025-08-19T15:04:11.501893Z ERROR [INFO] 2025-08-19 15:04:11,496 | Kestra | fn:_log(61) | message: [core_etl.connectors] Removed line: 1762 - public boolean isInteger(RuleAuxMethodsInterfaceImpl iNode, String attrName) {
2025-08-19T15:04:11.501908Z ERROR [INFO] 2025-08-19 15:04:11,496 | Kestra | fn:_log(61) | message: [core_etl.connectors] commit time difference in days---62
2025-08-19T15:04:11.501917Z ERROR [INFO] 2025-08-19 15:04:11,497 | Kestra | fn:_log(61) | message: [core_etl.connectors] Removed line: 1763 - List<Object> inpArg;
2025-08-19T15:04:11.501926Z ERROR [INFO] 2025-08-19 15:04:11,497 | Kestra | fn:_log(61) | message: [core_etl.connectors] commit time difference in days---62
2025-08-19T15:04:11.501936Z ERROR [INFO] 2025-08-19 15:04:11,497 | Kestra | fn:_log(61) | message: [core_etl.connectors] Removed line: 1764 - boolean returnVal = false;
2025-08-19T15:04:11.501944Z ERROR [INFO] 2025-08-19 15:04:11,497 | Kestra | fn:_log(61) | message: [core_etl.connectors] commit time difference in days---62
2025-08-19T15:04:11.501952Z ERROR [INFO] 2025-08-19 15:04:11,497 | Kestra | fn:_log(61) | message: [core_etl.connectors] Removed line: 1765 - try {
2025-08-19T15:04:11.501970Z ERROR [INFO] 2025-08-19 15:04:11,497 | Kestra | fn:_log(61) | message: [core_etl.connectors] commit time difference in days---62
2025-08-19T15:04:11.501982Z ERROR [INFO] 2025-08-19 15:04:11,497 | Kestra | fn:_log(61) | message: [core_etl.connectors] Removed line: 1766 - Integer.parseInt(iNode.getAttribute(attrName));
2025-08-19T15:04:11.501991Z ERROR [INFO] 2025-08-19 15:04:11,498 | Kestra | fn:_log(61) | message: [core_etl.connectors] commit time difference in days---62
2025-08-19T15:04:11.502Z ERROR [INFO] 2025-08-19 15:04:11,498 | Kestra | fn:_log(61) | message: [core_etl.connectors] Removed line: 1767 - returnVal = true;
2025-08-19T15:04:11.507196Z ERROR [INFO] 2025-08-19 15:04:11,498 | Kestra | fn:_log(61) | message: [core_etl.connectors] commit time difference in days---62
2025-08-19T15:04:11.507252Z ERROR [INFO] 2025-08-19 15:04:11,502 | Kestra | fn:_log(61) | message: [core_etl.connectors] Removed line: 1768 - } catch (NumberFormatException nfe) {
2025-08-19T15:04:11.507267Z ERROR [INFO] 2025-08-19 15:04:11,502 | Kestra | fn:_log(61) | message: [core_etl.connectors] commit time difference in days---62
2025-08-19T15:04:11.507277Z ERROR [INFO] 2025-08-19 15:04:11,503 | Kestra | fn:_log(61) | message: [core_etl.connectors] Removed line: 1769 - returnVal = false;
2025-08-19T15:04:11.507286Z ERROR [INFO] 2025-08-19 15:04:11,503 | Kestra | fn:_log(61) | message: [core_etl.connectors] commit time difference in days---62
2025-08-19T15:04:11.507295Z ERROR [INFO] 2025-08-19 15:04:11,503 | Kestra | fn:_log(61) | message: [core_etl.connectors] Removed line: 1770 - }
2025-08-19T15:04:11.507304Z ERROR [INFO] 2025-08-19 15:04:11,503 | Kestra | fn:_log(61) | message: [core_etl.connectors] commit time difference in days---62
2025-08-19T15:04:11.507312Z ERROR [INFO] 2025-08-19 15:04:11,503 | Kestra | fn:_log(61) | message: [core_etl.connectors] Removed line: 1771 - 
2025-08-19T15:04:11.507320Z ERROR [INFO] 2025-08-19 15:04:11,503 | Kestra | fn:_log(61) | message: [core_etl.connectors] commit time difference in days---62

Environment

  • Kestra Version: 0.22.17

Metadata

Metadata

Assignees

Labels

area/backendNeeds backend code changesbugSomething isn't working

Type

Projects

Status

In review

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions