[yum-cvs] yum cli.py,1.204,1.205

Seth Vidal skvidal at linux.duke.edu
Fri Jan 13 06:05:15 UTC 2006


Update of /home/groups/yum/cvs/yum
In directory login1.linux.duke.edu:/tmp/cvs-serv603

Modified Files:
	cli.py 
Log Message:

syslog logging support for the contents that go to yum.log


Index: cli.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/cli.py,v
retrieving revision 1.204
retrieving revision 1.205
diff -u -r1.204 -r1.205
--- cli.py	19 Dec 2005 06:16:09 -0000	1.204
+++ cli.py	13 Jan 2006 06:05:13 -0000	1.205
@@ -35,7 +35,7 @@
 import rpmUtils.arch
 from rpmUtils.miscutils import compareEVR
 from yum.packages import parsePackages, YumInstalledPackage, YumLocalPackage
-from yum.logger import Logger
+from yum.logger import Logger, SysLogger, LogContainer
 from yum import pgpmsg
 from i18n import _
 import callback
@@ -233,12 +233,20 @@
 
                 logfile =  os.fdopen(logfd, 'a')
                 fcntl.fcntl(logfd, fcntl.F_SETFD)
-                self.filelog = Logger(threshold = 10, file_object = logfile, 
+            
+                                      
+                filelog_object = Logger(threshold = 10, file_object = logfile, 
                                 preprefix = self.printtime)
             else:
-                self.filelog = Logger(threshold = 10, file_object = None, 
+                filelog_object = Logger(threshold = 10, file_object = None, 
                                 preprefix = self.printtime)
+
+            syslog_object = SysLogger(threshold = 10, 
+                                      facility=self.conf.syslog_facility,
+                                      ident=self.conf.syslog_ident)
             
+            self.filelog = LogContainer([syslog_object, filelog_object])
+
             # Handle remaining options
             if opts.assumeyes:
                 self.conf.assumeyes =1




More information about the Yum-cvs-commits mailing list