On Mon, 2011-03-07 at 13:10 -0500, Chris Lumens wrote: > This prevents live installs from having log files that just grow and > grow every time the user restarts liveinst. I would prefer if we put a big stamp/header in each log at the start of each run. That way we can see what all has been done and also have a good way to separate the data from various runs. Dave > --- > pyanaconda/anaconda_log.py | 2 +- > pyanaconda/yuminstall.py | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/pyanaconda/anaconda_log.py b/pyanaconda/anaconda_log.py > index 04dea8d..9be016e 100644 > --- a/pyanaconda/anaconda_log.py > +++ b/pyanaconda/anaconda_log.py > @@ -167,7 +167,7 @@ class AnacondaLog: > fmtStr=ENTRY_FORMAT, > autoLevel=False): > if isinstance(file, types.StringTypes): > - logfileHandler = logging.FileHandler(file) > + logfileHandler = logging.FileHandler(file, "w") > else: > logfileHandler = logging.StreamHandler(file) > > diff --git a/pyanaconda/yuminstall.py b/pyanaconda/yuminstall.py > index fe88586..dec146e 100644 > --- a/pyanaconda/yuminstall.py > +++ b/pyanaconda/yuminstall.py > @@ -741,7 +741,7 @@ class AnacondaYum(yum.YumBase): > > import yum.logginglevels > > - file_handler = logging.FileHandler("/tmp/yum.log") > + file_handler = logging.FileHandler("/tmp/yum.log", "w") > file_formatter = logging.Formatter("[%(asctime)s] %(levelname)-8s: %(message)s") > file_handler.setFormatter(file_formatter) > _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list