Skip to content

Default config.logging.handlers.datefmt is not compatible with file handler's filename timestamp parser #3743

Open

Description

@dmargala

The default config.logging.handlers.datefmt includes formatting directive for microseconds "%f" that is not generally supported by time.strftime used to append a timestamp to a filename for the file log handler.

https://reframe-hpc.readthedocs.io/en/stable/config_reference.html#config.logging.handlers.datefmt

It seems like it might be reasonable to replace time.strftime with datetime.now().strftime here:

filename = f'{basename}_{time.strftime(timestamp)}{ext}'

Activity

  1. added theissue type on Oct 22, 2026
  2. vkarak commented on Oct 22, 2026

    @vkarak
    Contributor

    Indeed, that's a bug; here's a reproducer:

    • Config file:
    logging:
      - handlers:
        - type: file
          level: info
          format: '%(asctime)s|%(levelname)s|%(message)s'
          filename: 'reframe.log'
          timestamp: true
          append: true
    • Run with
    uv run reframe -C config/issue_3743.yaml -c unittests/resources/checks/hellocheck.py -r

    And the resulting log file is

    /var/folders/qd/lnq76phj5_l8m6pz0gt2ct500000gp/T/rfm-z4rardq8_2026-10-22T15:16:42.f.log
  3. modified the milestones: , ReFrame 4.11 on Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions