Integrations
Python Task Logging
3 min
the python logging library in python tasks supports logging entities at info, warn, and error levels these logs, accessible through task pods, can be filtered by task id debug level logging is excluded to prevent unnecessary logs in the ui input logging to perform task logging, input the python script in the configuration tab and click run task from the debugger section the results section of the python task in ui displays the output, sw log handles all the executed log messages the previous logs can be found in the task pods you can request the support team to get all the logs related to python task and filter the logs based on taskid for example { "date" "2024 07 04 13 49 46 7559", "hostname" "vishals macbook pro", "layoutname" "python", "level" "info", "message" "sample message", "taskid" "adkquphhp71t ppdf" } { "date" "2024 07 04 13 49 46 7559", "hostname" "vishals macbook pro", "layoutname" "python", "level" "error", "message" "sample message", "taskid" "adkquphhp71t ppdf" } { "date" "2024 07 04 13 49 46 7559", "hostname" "vishals macbook pro", "layoutname" "python", "level" "warn", "message" "sample message", "taskid" "adkquphhp71t ppdf" } limitations this is specific to users utilizing the logging library in their python tasks python logging is limited to info, warn, and error levels debug level is excluded to prevent unnecessary logs from appearing in the ui only current logs are part of ui, logs history are part of audit logs only in the current use case, the sw log field should not be used for mapping purposes with the record fields it is specific to review and validating logs in the current execution any sensitive information should not be send by user as a part of python logging message since these messages are plain text, removing from log statements is challenging task