chiark
/
gitweb
/
~mdw
/
disorder
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4b37a75
)
If including both program name and date in log message, put date first.
author
Richard Kettlewell
<rjk@greenend.org.uk>
Sat, 17 Oct 2009 12:37:16 +0000
(13:37 +0100)
committer
Richard Kettlewell
<rjk@greenend.org.uk>
Sat, 17 Oct 2009 12:37:16 +0000
(13:37 +0100)
lib/log.c
patch
|
blob
|
blame
|
history
diff --git
a/lib/log.c
b/lib/log.c
index 95a89a1b872f7df90616cd7c2ee18694434920c6..00ec7cd3a2a4f8039321fba3be74f3ae64bc7532 100644
(file)
--- a/
lib/log.c
+++ b/
lib/log.c
@@
-123,8
+123,6
@@
static void logfp(int pri, const char *msg, void *user) {
* sanely */
const char *p;
* sanely */
const char *p;
- if(progname)
- fprintf(fp, "%s: ", progname);
if(logdate) {
char timebuf[64];
struct tm *tm;
if(logdate) {
char timebuf[64];
struct tm *tm;
@@
-132,7
+130,9
@@
static void logfp(int pri, const char *msg, void *user) {
tm = localtime(&tv.tv_sec);
strftime(timebuf, sizeof timebuf, "%Y-%m-%d %H:%M:%S %Z", tm);
fprintf(fp, "%s: ", timebuf);
tm = localtime(&tv.tv_sec);
strftime(timebuf, sizeof timebuf, "%Y-%m-%d %H:%M:%S %Z", tm);
fprintf(fp, "%s: ", timebuf);
- }
+ }
+ if(progname)
+ fprintf(fp, "%s: ", progname);
if(pri <= LOG_ERR)
fputs("ERROR: ", fp);
else if(pri < LOG_DEBUG)
if(pri <= LOG_ERR)
fputs("ERROR: ", fp);
else if(pri < LOG_DEBUG)