Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

是否可以考虑下多个日志文件的支持 #10

Open
WayneY opened this issue Oct 19, 2021 · 3 comments
Open

是否可以考虑下多个日志文件的支持 #10

WayneY opened this issue Oct 19, 2021 · 3 comments

Comments

@WayneY
Copy link

WayneY commented Oct 19, 2021

如果没理解错的话,目前似乎只支持同一时间内只输出到同一个日志文件中?能否考虑下支持分门别类输出日志内容到不同的日志文件里。在打日志时增加一个logger的指定(如不指定就用默认,以保持和现在行为一致)

@MengRao
Copy link
Owner

MengRao commented Oct 19, 2021

设计上不支持这个功能,这个库对低延迟的优先级更高。

@JaydenFish
Copy link

JaydenFish commented Oct 26, 2021

把fmtlogT再实例一个就可以了,让_=1.
我用这个来写文件的,延迟很低.

using fmtlog = fmtlogT<0>;
using fmtlogwritefile = fmtlogT<1>;
#define FMTLOG_WRITE(format, ...)                                                                                          \
    do {                                                                                                                   \
        static uint32_t logId = 0;                                                                                         \
        fmtlogWrapper<1>::impl.log(logId, 0, __FMTLOG_LOCATION, FMTLOG::LogLevel::INF, FMT_STRING(format), ##__VA_ARGS__); \
    } while (0)

@MengRao
Copy link
Owner

MengRao commented Oct 27, 2021

好想法,我还没想过这么去用。。。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants