diff options
author | Thomas White <taw@physics.org> | 2022-09-23 23:17:25 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2022-10-05 15:59:31 +0200 |
commit | 429e9b1e342f7487d1b109cc8232223c85322e5d (patch) | |
tree | 723ae13d7b8340029ea3801437434860d709dd3e /src | |
parent | 1d97a74deca0188e218f856c71997d89c38b1f58 (diff) |
ASAP::O: Add timestamps to errors
Diffstat (limited to 'src')
-rw-r--r-- | src/im-asapo.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/im-asapo.c b/src/im-asapo.c index 255a942d..82934d50 100644 --- a/src/im-asapo.c +++ b/src/im-asapo.c @@ -58,8 +58,15 @@ struct im_asapo static void show_asapo_error(const char *msg, const AsapoErrorHandle err) { char buf[1024]; + char tstr[256]; + time_t t; + struct tm *tmp; + + t = time(NULL); + tmp = localtime(&t); asapo_error_explain(err, buf, sizeof(buf)); - ERROR("%s: %s\n", msg, buf); + strftime(tstr, 256, "%d-%m-%y %T %z", tmp); + ERROR("[%s] %s: %s\n", tstr, msg, buf); } |