Changeset 93
- Timestamp:
- 07/03/05 04:54:55 (4 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
src/log.c
r79 r93 105 105 106 106 107 void log_perr _str(int priority, const char msg[], const char arg[])107 void log_perrno_str(int priority, const char msg[], const char arg[], int err) 108 108 { 109 const int fault_errno = errno; 110 if (!fault_errno) 109 if (!err) 111 110 { 112 111 log_str(priority, msg, arg); … … 114 113 else 115 114 { 116 const char *std = strerror( fault_errno);115 const char *std = strerror(err); 117 116 if (logging) 118 117 syslog(priority, "%s '%s': %s", msg, arg, std); … … 120 119 fprintf(stream(priority),"%s%s '%s': %s\n",prefix(priority),msg,arg,std); 121 120 } 121 } 122 123 124 void log_perr_str(int priority, const char msg[], const char arg[]) 125 { 126 log_perrno_str(priority, msg, arg, errno); 122 127 } 123 128 src/log.h
r76 r93 45 45 void log_perr_str(int priority, const char msg[], const char arg[]); 46 46 47 /// Log message, perror()-style, but appending a quoted string 48 void log_perrno_str(int priority, const char msg[], const char arg[], int err); 49 47 50 /// Log message, but appending an integer argument 48 51 void log_int(int priority, const char msg[], int arg);
