Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python error logs are captured as WARNING log level #190

Closed
anna-geller opened this issue Nov 26, 2024 · 0 comments · Fixed by kestra-io/kestra#6383
Closed

Python error logs are captured as WARNING log level #190

anna-geller opened this issue Nov 26, 2024 · 0 comments · Fixed by kestra-io/kestra#6383
Assignees
Labels
area/backend Needs backend code changes area/plugin Plugin-related issue or feature request bug Something isn't working kind/bugfix-needed Issue that needs to be addressed in the next bugfix release kind/cooldown Great candidate for the cooldown period

Comments

@anna-geller
Copy link
Member

Describe the issue

Repro:

id: error_logs_demo
namespace: company.team

tasks:    
  - id: fail
    type: io.kestra.plugin.scripts.python.Script
    taskRunner:
      type: io.kestra.plugin.core.runner.Process
    script: |
      raise ValueError("An error occurred: This is a manually raised exception.")
errors:
  - id: alert
    type: io.kestra.plugin.core.log.Log
    message: list of error logs — {{ errorLogs() }}

Another example:

id: error_logs_demo
namespace: company.team

tasks:    
  - id: fail
    type: io.kestra.plugin.scripts.python.Script
    taskRunner:
      type: io.kestra.plugin.core.runner.Process
    script: |
      def divide_numbers(a, b):
          return a / b

      result = divide_numbers(5, 0)
      print(result)

errors:
  - id: alert
    type: io.kestra.plugin.core.log.Log
    message: list of error logs — {{ errorLogs() }}

Environment

  • Kestra Version: develop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/backend Needs backend code changes area/plugin Plugin-related issue or feature request bug Something isn't working kind/bugfix-needed Issue that needs to be addressed in the next bugfix release kind/cooldown Great candidate for the cooldown period
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants