Changeset 30082
- Timestamp:
- Dec 17, 2010, 9:11:47 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20101205/psLib/src/sys/psLogMsg.c
r28404 r30082 310 310 *head_ptr++ = '|'; 311 311 } 312 maxLength -= snprintf(head_ptr, maxLength, "%s ", name);312 maxLength -= snprintf(head_ptr, maxLength, "%s\n", name); 313 313 314 314 head_ptr += strlen(head_ptr); 315 315 } 316 317 316 if (head_ptr > head) { 318 *head_ptr++ = '\n'; 319 } else if (!logMsg) { // no output desired 317 *head_ptr++ = '|'; 318 } 319 320 // XXX rather than putting in a return for the message, let's only put in the return if we asked for the function name 321 if ((head_ptr == head) && !logMsg) { // no output desired 320 322 return; 321 323 } … … 332 334 char *line = strtok_r(msg, "\n", &msgPtr); 333 335 while (line) { 334 if(write(logFD, " ", 4)) {;} // ignore return value336 if(write(logFD, " ", PS_MIN(level, 10))) {;} // ignore return value 335 337 if(write(logFD, line, strlen(line))) {;} // ignore return value 336 338 if(write(logFD, "\n", 1)) {;} // ignore return value
Note:
See TracChangeset
for help on using the changeset viewer.
