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

Simplify logging #68

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Simplify logging #68

wants to merge 1 commit into from

Conversation

zilder
Copy link
Contributor

@zilder zilder commented Aug 19, 2019

This is just a proof of concept, actual macro name may be changed in final version. But the general idea is to simplify the way logging is implemented. Namely it requires developer to specify __FILE__ and __LINE__ macros manually. In this PR i introduce logger_log_fileinfo function similar to logger_log with the only difference that it accepts extra file and line number arguments. Also log macro was introduced which automatically puts file and line number in the function call. This design particularly allows to use log without any format arguments like this:

log("some error message");

I left the original logger_log func calls in the places where __FILE__ and __LINE__ hadn't been used. Probably it makes sense to make them uniform and use the new log macro instead.

@zilder zilder requested a review from 65278 August 19, 2019 12:01
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

Successfully merging this pull request may close these issues.

1 participant