Skip to content

Write CASA logs to named log directory #2

@Jordatious

Description

@Jordatious

CASA logs get written to casa-timestamp.log, but it would be useful if they were named like the SLURM logs, according to the task and job / task array ID that wrote them.

It is possible to rename the logs immediately after importing casatasks, such as:

import os
import casatasks
casatasks.casalog.setlogfile('logs/{SLURM_JOB_NAME}-{SLURM_ARRAY_JOB_ID}_{SLURM_ARRAY_TASK_ID}.casa'.format(**os.environ))

However, it seems a very short default CASA log with the timestamp still gets written before this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions