-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
用户希望只有某些level的LOG才写入文件 #137
Comments
在 elog 的输出接口中过滤一下日志级别就可以了 https://github.com/armink/EasyLogger/blob/master/easylogger/port/elog_port.c#L60-L64 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
写FLASH/文件系统的操作,不应该在PORT层中,用户也许会希望控制某个级别的LOG,来决定是否写入FLASH/文件系统。
比如, assert, error, warning写入文件系统,而其他lv不写入。
目前我的做法是简单的复用了FMT,在elog.c中来决定是根据标志来决定是否写入文件/FLASH。
由于FMT是格式化用的,可能不是很妥当,但这样做法比较灵活,也可以单独设置一个FILE level,大于某个LV的来决定是否要写入文件。
The text was updated successfully, but these errors were encountered: