[Freeipa-devel] [PATCH] [ipa-2-1] 183 Make sure that install tools log

Martin Kosek mkosek at redhat.com
Tue Jan 3 08:36:11 UTC 2012


On Mon, 2012-01-02 at 19:35 +0300, Alexander Bokovoy wrote:
> On Mon, 02 Jan 2012, Martin Kosek wrote:
> > This is a ipa-2-1 branch fix only. master branch use better and more
> > sophisticated approach to fix logging (ticket 2022).
> > 
> > ----
> > When any log message is emitted before IPA install tools logging is
> > configured, it may break and leave install tools log empty. This
> > happens for example when
> > 
> > ipa-server-install --ip-address=$IP_ADDRESS
> > 
> > is run.
> > 
> > This patch makes sure that logging is right in these cases.
> > 
> > https://fedorahosted.org/freeipa/ticket/2214
> This is a good start. However, we'll still get messages from 
> --ip-address processing lost.
> 
> What about adding a Handler class to buffer LogRecords?
> 
> Set it in the root logger as the very first action in those three 
> tools (ipa-dns-install, ipa-replica-prepare, ipa-server-install) that accept 
> --ip-address option.
> 
> When standard_logging_setup() is called, it would check for existing 
> handlers and first pull in the records, then remove the handler, 
> call basicSetup() and re-issue the LogRecords again?
> 
> This way we'll get all the records recovered and will get around 
> IPACheckedAddress limitations.
> 

That's a good idea! This way we won't miss any log before our logging
setup. Updated patch attached.

Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-mkosek-183-2-make-sure-that-install-tools-log.patch
Type: text/x-patch
Size: 5162 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20120103/b14c0662/attachment.bin>


More information about the Freeipa-devel mailing list