Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Gentoo Development (http://www.linux-archive.org/gentoo-development/)
-   -   introduce loglevel flag and use it in yum's tty3 logging (http://www.linux-archive.org/gentoo-development/304128-introduce-loglevel-flag-use-yums-tty3-logging.html)

Chris Lumens 01-04-2010 03:14 PM

introduce loglevel flag and use it in yum's tty3 logging
 
> diff --git a/yuminstall.py b/yuminstall.py
> index 7a1f0c5..e7b8387 100644
> --- a/yuminstall.py
> +++ b/yuminstall.py
> @@ -632,6 +632,7 @@ class AnacondaYum(YumSorter):
> logger.setLevel(yum.logginglevels.INFO_2)
> logger.addHandler(file_handler)
> anaconda_log.autoSetLevel(tty3_handler, True)
> + tty3_handler.setLevel(flags.loglevel)
> logger.addHandler(tty3_handler)
>
> # XXX filelogger is set in setFileLog - do we or user want it?

Can you get the loglevel here by doing something other than introducing
a new flag?

- Chris

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

Ales Kozumplik 01-05-2010 07:29 AM

introduce loglevel flag and use it in yum's tty3 logging
 
Can you get the loglevel here by doing something other than introducing
a new flag?

- Chris


Options are:

1) Put the information in the anaconda_log.logger object.
2) Put it in installdata --- but that's out of question since you are
going to remove it.
3) Put it in flags, so loglevel gets to be handled in the same way like
other stuff in opts. Why exactly do you object, is it because you want
to remove flags too?
4) I could also take a look into flags.cmdline to see if loglevel is
there and then map it into logging's loglevel and then use, like we do
in setupLoggingFromOpts. I think in that case I would introduce a method
to do that in anconda_log, but that would create anaconda_log -> flags
dependency.


Ales

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

Chris Lumens 01-07-2010 04:54 PM

introduce loglevel flag and use it in yum's tty3 logging
 
> 1) Put the information in the anaconda_log.logger object.

This seems like a pretty good idea to me.

The anaconda object could also be a decent place for it.

> 2) Put it in installdata --- but that's out of question since you
> are going to remove it.

Right. Don't put anything in instdata now unless you really have to,
since I'm going to be killing it post-branch.

> 3) Put it in flags, so loglevel gets to be handled in the same way
> like other stuff in opts. Why exactly do you object, is it because
> you want to remove flags too?

Peter's working on making the flags make sense, so we probably don't
want to touch too much stuff in there. Also, adding things to flags
makes me wonder if there's not a better place for it. The flags are
starting to seem like a catch-all for stuff that doesn't have a real
home.

- Chris

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


All times are GMT. The time now is 07:40 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.