Re: [pygccxml-development] How to customize log messages?
Brought to you by:
mbaas,
roman_yakovenko
From: Roman Y. <rom...@gm...> - 2006-04-20 16:52:52
|
On 4/20/06, Matthias Baas <ba...@ir...> wrote: > Sorry for the delay on this topic, but other stuff has just been more > urgent during the last couple of days... This is okay. > Roman Yakovenko wrote: > >> Well, I had a look at _logging_ and noticed that it's not quite true > >> that one cannot set the verbosity level. As the standard logging modul= e > >> is used I can obtain the logger and adjust the level (I don't know if > >> setting the level to DEBUG by default is such a good idea...). > > > > I did not think about this a lot. But I prefer to leave it as is. You > > are an experience > > user of pyplusplus, other developers are not. So I think they will be g= lad > > to see so many log messages at least one week. After this they will inc= rease > > log messages level. > > If they will find out how to do it.... ;-) They do, trust me. Maximum if we will see a lot of mails on this topic we w= ill change our default. > >> The presence of the _logging_ module suggests that you already have so= me > >> plans concerning log messages in pygccxml/pyplusplus. What plans do yo= u > >> have how logging should be done? (or if there are no plans, why didn't > >> you use the logging module directly?) > > > > Tool chain. I would like to see people start integrate code generation = within > > their build process. Thus dedicating some logger to pygccxml/pyplusplus= will > > allow them better control on process. > > > > As I already said, in future we will add under main/root project > > logger, loggers for > > some specific packages. Thus you will have only one point to configure > > all loggers > > for whole code generator. > > > > Does it make sense? Do you agree with this. If so, I will add to "todo.= txt" this > > explanation. So someone will be ale to implement this. > > I'm sorry, I'm afraid I don't understand your argument here. You only > seem to argue that some logging functionality is required. And of > course, I fully agree with that and I've never questioned that. > The only thing I don't understand yet is the rationale behind the > "_logging_" module. Where does _logging_ have advantages over the > standard logging module and using some standardized logger names within > pygccxml/pyplusplus? Okay, I was not clear. _logging_ module solves 2 technical problems: 1. I want some module/package that will be independent on all other package= s, because I want to use it in every ( well almost every other ) module wi= thin pyplusplus 2. I want to keep code that configure the loggers in one place. That is why I introduced _logging_ package. This is the best name I had. I am not going to reinvent the wheel and use Python build in logging module= . > I even think using the Python logging module directly has the advantage > that pygccxml/pyplusplus can use one common logging mechanism whereas so > far, _logging_ is only available in pyplusplus If user wants pyplusplus/pygccxml to write into his logger, it is very simp= le: _logging_.logger =3D custom_logger That's all >what does pygccxml use for writing log messages?. 1. Command line used to run GCC-XML. 2. Report different stage: compile, link > - Matthias - > -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ |