diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2018-06-25 21:57:48 +0200 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2018-06-25 21:57:48 +0200 |
commit | c37398b36468f05d45049ac4f14a3e3f40f2076f (patch) | |
tree | 40752781bf6b402f97baeed3f25f539aec04b5c1 /src | |
parent | e4fc2c5b5eeac1d2a1f2c2a2e466ffaf4bc45f2e (diff) |
logging pid rjust
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/log_colored.c | 8 | ||||
-rw-r--r-- | src/log_file.c | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/log_colored.c b/src/log_colored.c index fcf6b11..946f802 100644 --- a/src/log_colored.c +++ b/src/log_colored.c @@ -14,16 +14,16 @@ #include "log_colored.h" -#define LOG(time, facl, pid, out) { printf("[%s]" facl "[%d] %s\n", time, pid, out); } while(0) +#define LOG(time, facl, pid, out) { printf("[%s]" facl "[%5d] %s\n", time, pid, out); } while(0) #define LOGEX(time, facl, pid, src, line, out) \ - { printf("[%s]" facl "[%d] %s.%zu: %s\n", time, pid, src, line, out); } while(0) + { printf("[%s]" facl "[%5d] %s.%zu: %s\n", time, pid, src, line, out); } while(0) #define LOGEXERR(time, facl, pid, src, line, out, serrno) \ { \ if (serrno) { \ - printf("[%s]" facl "[%d] %s.%zu: %s failed: %s\n", \ + printf("[%s]" facl "[%5d] %s.%zu: %s failed: %s\n", \ time, pid, src, line, out, strerror(serrno)); \ } else { \ - printf("[%s]" facl "[%d] %s.%zu: %s failed\n", \ + printf("[%s]" facl "[%5d] %s.%zu: %s failed\n", \ time, pid, src, line, out); \ } \ } while(0) diff --git a/src/log_file.c b/src/log_file.c index 27ad0a7..c909e8f 100644 --- a/src/log_file.c +++ b/src/log_file.c @@ -8,19 +8,19 @@ #include "log_file.h" #define LOG(fp, time, facl, pid, out) \ - { fprintf(fp, "[%s]" facl "[%d] %s\n", time, pid, out); } while(0) + { fprintf(fp, "[%s]" facl "[%5d] %s\n", time, pid, out); } while(0) #define LOGEX(fp, time, facl, pid, src, line, out) \ { \ - fprintf(fp, "[%s]" facl "[%d] %s.%zu: %s\n", \ + fprintf(fp, "[%s]" facl "[%5d] %s.%zu: %s\n", \ time, pid, src, line, out); \ } while(0) #define LOGEXERR(fp, time, facl, pid, src, line, out, serrno) \ { \ if (serrno) { \ - fprintf(fp, "[%s]" facl "[%d] %s.%zu: %s failed: %s\n", \ + fprintf(fp, "[%s]" facl "[%5d] %s.%zu: %s failed: %s\n", \ time, pid, src, line, out, strerror(serrno)); \ } else { \ - fprintf(fp, "[%s]" facl "[%d] %s.%zu: %s failed\n", \ + fprintf(fp, "[%s]" facl "[%5d] %s.%zu: %s failed\n", \ time, pid, src, line, out); \ } \ } while(0) |