Skip to content

Mandatory logging #5460

@ikbuibui

Description

@ikbuibui

We have a bitmask for various logging levels in PIConGPU. The default logging level is PHYSICS = 1. For places where we must warn the user irrespective of the set logging level, there is no obvious solution on how to do this.
A few options are

  • Using CRITICAL and enabling this by default - This might be misleading since I think "critical" implies errors
  • Add a new MANDATORY level bit which is enabled by default. This can be something like 1ULL<<7 or also 1ULL<<63
  • Custom log levels per code section - Similar to what radiation does, but IMO this adds complexity without much benefit
  • Having a always-true bitmask and call this MANDATORY - We can use a value like ~0ULL (all bits set) so any bitwise & operation returns true. This will require some changes to the logging output logic as it will otherwise say that logs made by MANDATORY are actually made by the level enabled by default.

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