diff options
author | Omar Polo <op@omarpolo.com> | 2023-08-29 09:35:07 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2023-08-29 09:35:07 +0000 |
commit | 96515efd278ce8ad5bbc2528d8197e766674cdae (patch) | |
tree | b1ced5917800645eae269727ef87b0d180083dba /ge.c | |
parent | 80745f04113ce73ae4f5aaba5c6a458af92590d0 (diff) |
tweak gemexp logs
gemexp is meant for local testing so I'm not too worried about
changing its log format if it makes sense to do so.
Diffstat (limited to 'ge.c')
-rw-r--r-- | ge.c | 12 |
1 files changed, 1 insertions, 11 deletions
@@ -45,17 +45,7 @@ log_request(struct client *c, int code, const char *meta) { char b[GEMINI_URL_LEN]; char cntmp[64], cn[64] = "-"; - char rfc3339[32]; const char *t; - struct tm *tm; - time_t now; - - if ((now = time(NULL)) == -1) - fatal("time"); - if ((tm = localtime(&now)) == NULL) - fatal("localtime"); - if (strftime(rfc3339, sizeof(rfc3339), "%FT%T%z", tm) == 0) - fatal("strftime"); if (c->iri.schema != NULL) { /* serialize the IRI */ @@ -95,7 +85,7 @@ log_request(struct client *c, int code, const char *meta) } } - fprintf(stderr, "%s %s %s %s %s 0 %d %s\n", rfc3339, c->rhost, cn, + fprintf(stderr, "%s %s %s %s %d %s\n", c->rhost, cn, *c->domain == '\0' ? c->iri.host : c->domain, b, code, meta); } |