Lines 201-215
Link Here
|
201 |
} |
201 |
} |
202 |
/* |
202 |
/* |
203 |
* Application name, process ID, message ID and structured data. |
203 |
* Application name, process ID, message ID and structured data. |
204 |
* Provide the process ID regardless of whether LOG_PID has been |
|
|
205 |
* specified, as it provides valuable information. Many |
206 |
* applications tend not to use this, even though they should. |
207 |
*/ |
204 |
*/ |
|
|
205 |
|
208 |
if (LogTag == NULL) |
206 |
if (LogTag == NULL) |
209 |
LogTag = _getprogname(); |
207 |
LogTag = _getprogname(); |
210 |
(void)fprintf(fp, "%s %d - - ", |
|
|
211 |
LogTag == NULL ? "-" : LogTag, getpid()); |
212 |
|
208 |
|
|
|
209 |
(void)fprintf(fp, "%s ", LogTag == NULL ? "-" : LogTag); |
210 |
|
211 |
if (LogStat & LOG_PID) |
212 |
(void)fprintf(fp, "%d - - ", getpid()); |
213 |
else |
214 |
(void)fprintf(fp, "- - - "); |
215 |
|
213 |
/* Check to see if we can skip expanding the %m */ |
216 |
/* Check to see if we can skip expanding the %m */ |
214 |
if (strstr(fmt, "%m")) { |
217 |
if (strstr(fmt, "%m")) { |
215 |
|
218 |
|
Lines 437-443
Link Here
|
437 |
{ |
440 |
{ |
438 |
if (ident != NULL) |
441 |
if (ident != NULL) |
439 |
LogTag = ident; |
442 |
LogTag = ident; |
440 |
LogStat = logstat; |
443 |
|
|
|
444 |
/* |
445 |
* Include the process ID by default: it provides valuable |
446 |
* information. Many applications tend not to use this, even |
447 |
* though they should. |
448 |
* Disable LOG_PID only if it is specifically masked. |
449 |
*/ |
450 |
LogStat = logstat | LOG_PID; |
451 |
if (logstat != 0 && (logstat &~ LOG_PID) == ~LOG_PID) |
452 |
LogStat = 0; |
453 |
|
441 |
if (logfac != 0 && (logfac &~ LOG_FACMASK) == 0) |
454 |
if (logfac != 0 && (logfac &~ LOG_FACMASK) == 0) |
442 |
LogFacility = logfac; |
455 |
LogFacility = logfac; |
443 |
|
456 |
|