Skip to content

print[Info|Error] ignores setting of stdout/stderr when spdlog is enabled at compile time #257

@cwsmith

Description

@cwsmith

The branch here
https://github.com/SCOREC/pcms/compare/cws/testPrint?expand=1
demonstrates a use case I was hoping printInfo would support for debugging. Specifically, I wanted to create one file per rank and have each rank's calls to printInfo(...) write to that file.

After some digging, I found that when spdlog is enabled, this line

spdlog::info("{}", fmt::sprintf(fmt, args...));

ignores what the user set stdout (and likewise for stderr) and writes using spdlog.

This isn't exactly a bug, but it is unexpected behavior. Ideally, I'd like support for the debugging use case described above and should only require some minor changes.

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