diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2023-06-28 23:47:01 +0200 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2023-06-28 23:47:01 +0200 |
commit | e20208a3731d1c98aa1ac5609dbb73ed5a5de46b (patch) | |
tree | cc8eb47bab3ac32df69659520abefbcc55f3cd03 /src | |
parent | add .pytest_cache to .gitignore (diff) | |
download | cimple-e20208a3731d1c98aa1ac5609dbb73ed5a5de46b.tar.gz cimple-e20208a3731d1c98aa1ac5609dbb73ed5a5de46b.zip |
log: minor refactoring
Diffstat (limited to 'src')
-rw-r--r-- | src/log.h | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -39,7 +39,7 @@ void log_entry_end(FILE *dest); log_entry_end(stdout); \ } while (0) -#define log_err_file_loc() \ +#define _log_err_file_loc() \ do { \ fprintf(stderr, "%s(%d): ", basename(__FILE__), __LINE__); \ } while (0) @@ -48,7 +48,7 @@ void log_entry_end(FILE *dest); do { \ if (!log_entry_start(LOG_LVL_ERR, stderr)) \ break; \ - log_err_file_loc(); \ + _log_err_file_loc(); \ fprintf(stderr, __VA_ARGS__); \ log_entry_end(stderr); \ } while (0) @@ -57,7 +57,7 @@ void log_entry_end(FILE *dest); do { \ if (!log_entry_start(LOG_LVL_ERR, stderr)) \ break; \ - log_err_file_loc(); \ + _log_err_file_loc(); \ perror(fn); \ log_entry_end(stderr); \ } while (0) |