[Yum-devel] log installroot in file log
Tim Lauridsen
tla at rasmil.dk
Thu Oct 18 14:33:06 UTC 2007
seth vidal wrote:
> On Wed, 2007-10-17 at 16:06 -0400, Jeremy Katz wrote:
>
>> On Wed, 2007-10-17 at 14:50 -0400, James Antill wrote:
>>
>>> On Wed, 2007-10-17 at 20:21 +0200, Terje Røsten wrote:
>>>
>>>> * seth vidal
>>>>
>>>>> A while back it was suggested that we log which installroot the pkgs
>>>>> were installed in if it is not /
>>>>>
>>>>> so something like:
>>>>> Oct 17 13:37:01 Installed: zsh - 4.3.4-4.fc8.i386 - /my/chroot
>>>>> Oct 17 13:38:33 Erased: zsh - /my/chroot
>>>>>
>>>>> I just added this in - does it make sense to everyone to not list it if
>>>>> it /?
>>>>>
Look fine to me, but this should not be the default, but something that
can be enabled.
>>> Who asked for this, and did they give a problem they are trying to
>>> solve by it?
>>> I think a better solution is to use a different log file when using a
>>> custom installroot, so maybe they'd be happy with a --logfile cmd line
>>> option?
>>>
>> It wasn't such a huge problem in the past when we just did file logging,
>> but now that we also log to syslog, we either need to make the logging
>> more explicit or give a good way to disable the syslogging.
>>
>>
>
> this sounds like we then just need a nicer way of fixing the logging.
>
> in general the logging needs:
> 1. simplified api for file/stdout/stderr/syslog output
> 2. simplified configuration - afaict no one cares at all about
> outputting more levels by default.
>
> I think the logging has been over-thought since yum 0.8. We need
> something much more simple and we're slowly converging there, I think.
>
> I don't mind making a separate call to output to stderr vs stdout vs
> filelog and turning up the verbosity as an option to the log, but I do
> mind not being able to tell what:
>
> self.verbose_logger.log(logginglevels.INFO_2, 'Loading "%s" plugin',
> modname)
>
> will output vs:
> self.verbose_logger.log(logginglevels.DEBUG_1, 'foo')
>
> vs:
>
> self.verbose_logger.log(logginglevels.DEBUG_4, 'bar')
>
> at the same time a lot of our log outputs for debug logs are a mess.
> We're outputting in places where we used to have lots of problems but
> are now fairly stabilized code bases. - updates.py, for example.
> ratcheting back the debug output there would probably help us all
> around.
>
I agree, the logging need to simplified and cleanup
self.verbose_logger.log(logginglevels.DEBUG_1, 'foo') don't looks good to me and it hate to type it :)
do we need all that levels, it will be much more simpler if we could use
self.verbose_logger.info('This is the normal output text')
self.verbose_logger.debug('This is extra verbosity information')
self.verbose_logger.error('This is an Error')
self.verbose_logger.warning('This is an warning')
and maybe
s/self.verbose_logger/self.log/
or
s/self.verbose_logger/self.console/
There could also be some wrapper to write to more loggers at the same time.
def log_all(self,msg):
self.console.info(msg) # Write to console logger
self.syslog.info(msg) # Write to syslog
self.filelog.info(msg) # Write to filelog
> Finally, fitting in gettext support is critical for the next dev cycle.
>
We can't keep it out forever :)
Tim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.baseurl.org/pipermail/yum-devel/attachments/20071018/06476cda/attachment.htm
More information about the Yum-devel
mailing list