Skip to content

LOG_<LEVEL> macros conflicting with app macros #735

Open

Description

@vlahd

Namely, I'm having issues with LOG_DEBUG and LOG_ERROR. These are very common names for logging macros and it's a small but annoying issue. Can they be prefixed with DILIGENT_ or some other naming convention?

Thank you!

Activity

  1. TheMostDiligent commented on Dec 15, 2025

    @TheMostDiligent
    Contributor

    These macros are intended to only be used internally, they should not leak to the public API. Do you know what header causes the conflict?

  2. vlahd commented on Dec 15, 2025

    @vlahd
    Author

    I'll track it down and update the ticket

  3. vlahd commented on Dec 15, 2025

    @vlahd
    Author

    Sadly can't really find some good tools to help with this. So far I've tracked LOG_ERROR somehow leaking from #include <DiligentTools/TextureLoader/interface/TextureUtilities.h>. Not sure where LOG_DEBUG is coming from tho yet.

    I'll write a quick script when I find some time to figure it out

  4. TheMostDiligent commented on Dec 16, 2025

    @TheMostDiligent
    Contributor

    Yes, this header indeed leaks LOG_ERROR. Fixing it is not straightforward though, I would recommend just #undef LOG_ERROR as a temporary workaround.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions