Skip to content

Use categories for RZLog #450

@Pikachuxxxx

Description

@Pikachuxxxx

We want to add simple logging categories (like VFS, RHI, SceneGraph) without creating multiple loggers or sinks. Instead of creating new loggers, we can just print the category in the message using macros.

#define RAZIX_CORE_INFO_CAT(CAT, ...) \
    ::Razix::Debug::RZLog::GetCoreLogger()->info("[" #CAT "] " __VA_ARGS__)
    
#define RAZIX_CORE_WARN_CAT(CAT, ...) \
    ::Razix::Debug::RZLog::GetCoreLogger()->warn("[" #CAT "] " __VA_ARGS__)

RAZIX_CORE_INFO_CAT(VFS, "Mounted pak file: {}", pakName);
RAZIX_CORE_WARN_CAT(SceneGraph, "Node {} has no mesh", nodeName);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions