Skip to content

Save the tool logs

How to save the tool logs

The --tool-logs-basepath option specifies the base directory path where Calrissian will save the logs generated by each CWL (Common Workflow Language) tool during the execution of a workflow.

These logs capture detailed information about the execution of each tool, which can be critical for debugging, monitoring, and auditing purposes.

During the execution of a CWL workflow, each tool that is run as part of the workflow may produce logs. These logs include standard output, standard error, and any other tool-specific logging information.

The --tool-logs-basepath option allows you to define a base directory where all these logs will be stored.

Calrissian organizes the logs within this directory, typically creating subdirectories for each tool or task. By setting this path, you ensure that all tool logs are centrally located and easily accessible for post-execution review.

Usage Example

apiVersion: batch/v1
kind: Job
metadata:
  name: water-bodies-detection
spec:
  ttlSecondsAfterFinished: 60
  template:
    spec:
      serviceAccountName: calrissian-sa
      securityContext:
        runAsUser: 1000
        runAsGroup: 1000
      containers:
        - name: calrissian
          image: ghcr.io/duke-gcb/calrissian/calrissian:0.16.0
          command: ["calrissian"]
          args:
            - --tool-logs-basepath 
            - /calrissian/logs
            ...
            - /app-package/app-package.cwl
            - /inputs/params.yaml
          volumeMounts:
            - name: calrissian-volume
              mountPath: /calrissian
            - name: params-volume
              mountPath: /inputs
            - name: app-package-volume
              mountPath: /app-package
          env:
            - name: CALRISSIAN_POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
      restartPolicy: Never
      volumes:
        - name: calrissian-volume
          persistentVolumeClaim:
            claimName: calrissian-claim 
        - name: params-volume
          configMap:
            name: params  
        - name: app-package-volume
          configMap:
            name: app-package
  backoffLimit: 3