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

logs in failure #688

Open
Kaiden0001 opened this issue Oct 1, 2024 · 1 comment
Open

logs in failure #688

Kaiden0001 opened this issue Oct 1, 2024 · 1 comment

Comments

@Kaiden0001
Copy link

Hi, how can i when processing failure in handlerOn get the last 100 lines of log ?
I want to send a message with the latest logs when my project crashes.

@yohamta
Copy link
Collaborator

yohamta commented Oct 1, 2024

Hi, at the moment, Dagu provide the following three special environment variables:

  • DAG_EXECUTION_LOG_PATH: The path to the log file for the current step.
  • DAG_SCHEDULER_LOG_PATH: The path to the log file for the scheduler.
  • DAG_REQUEST_ID: The unique ID for the current execution request.

As a workaround, you can search for files containing ${DAG_REQUEST_ID:0:8} in it's file name to retrieve all log files associated with the current DAG execution. But it is not a solution to access log files from the error step.

Accessing the log files from the error step sounds like useful capability in general. Let me explore potential ways to implement this, and perhaps we can look into how other workflow tools like Airflow handle similar situations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants