Revision
23313
Author
zarzycki@apple.com
Date
2007-07-16 10:21:16 -0700 (Mon, 16 Jul 2007)

Log Message

<rdar://problem/5334227> launchd-shutdown.log lost most of its informative value

Modified Paths

Diff

Modified: trunk/launchd/src/launchd.c (23312 => 23313)


--- trunk/launchd/src/launchd.c	2007-07-16 16:54:29 UTC (rev 23312)
+++ trunk/launchd/src/launchd.c	2007-07-16 17:21:16 UTC (rev 23313)
@@ -262,6 +262,7 @@
 		 * When this changes to a more sustainable API, update this:
 		 * http://howto.apple.com/db.cgi?Debugging_Apps_Non-Responsive_At_Shutdown
 		 */
+		runtime_setlogmask(LOG_UPTO(LOG_DEBUG));
 		prep_shutdown_log_dir();
 		debug_shutdown_hangs = true;
 	}

Modified: trunk/launchd/src/launchd_runtime.c (23312 => 23313)


--- trunk/launchd/src/launchd_runtime.c	2007-07-16 16:54:29 UTC (rev 23312)
+++ trunk/launchd/src/launchd_runtime.c	2007-07-16 17:21:16 UTC (rev 23313)
@@ -1084,9 +1084,11 @@
 
 	prev_msg = tvnow;
 
-	snprintf(newmsg, sizeof(newmsg), "%3ld.%06d\t%ld.%06d\t",
+	snprintf(newmsg, sizeof(newmsg), "%3ld.%06d%4ld.%06d%6u %-40s%6u %-40s ",
 			tvd_total.tv_sec, tvd_total.tv_usec,
-			tvd_msg_delta.tv_sec, tvd_msg_delta.tv_usec);
+			tvd_msg_delta.tv_sec, tvd_msg_delta.tv_usec,
+			attr->from_pid, attr->from_name,
+			attr->about_pid, attr->about_name);
 
 	for (i = 0, j = strlen(newmsg); message[i];) {
 		if (message[i] == '%' && message[i + 1] == 'm') {