[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Ltib] [patch] Better logfile handling

From: Svein Seldal
Subject: [Ltib] [patch] Better logfile handling
Date: Mon, 06 Jul 2009 21:55:16 +0200
User-agent: Thunderbird (X11/20090608)


I was annoyed by the fact that host_config.log was deleted whenever --hostcf was run. If you had an ongoing tail running on that file, you'd have to restart tail to get the new output.

The attached patch doesn't delete the log prior to use. It truncates the file instead (which apps like tail is capable of detecting).

Please apply if found relevant/interesting.

BTW: I'm missing a similar logfile-feature like host_config.log for target building, like target_config.log. Because this is only available in --hostcf, isn't it?

To redirect/pipe ltib's output to file with or without tee will put a lot of ncurses code into the log, which results in unreadable logs.

What do you think?

- Svein
Index: ltib
RCS file: /sources/ltib/ltib/ltib,v
retrieving revision 1.36
diff -u -r1.36 ltib
--- ltib        6 Jul 2009 13:16:39 -0000       1.36
+++ ltib        6 Jul 2009 19:33:27 -0000
@@ -1423,11 +1423,8 @@
-    # remove the previous logfile
-    unlink($cf->{logfile});
     # redirect output to logfile
-    redirect(">> $cf->{logfile}");
+    redirect("> $cf->{logfile}");
     # use the host's rpm to bootstrap a known version of rpm
     check_rpm_setup() or die;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]