On 03/30/2012 06:21 AM, Petr Viktorin wrote:
Updated patch: only log if logging has been configured (detected by
looking at the root logger's handlers), and changed the message to “The
ipa-server-install command has succeeded/failed”.

Actually the log_manager has an attribute called configure_state whose purpose is to tell you if the log manager has been configured (not None) and if so how it was configured. When it's not None it's a string whose value is by programmer convention (there are no restrictions). Currently the 3 values in use are:

'standard'
    The log_mgr was initialized by standard_logging_setup()
'default'
    The log_mgr was initialized by virtue of the ipa_log_manager being
    loaded.
'api'
    The log_mgr was initialized by the plugin bootstrap process (i.e.
    the api is initialized and has the log manager bound to it).

It better to reference log_mgr.configure_state than to make assumptions about the internals of the class.

--
John Dennis <jden...@redhat.com>

Looking to carve out IT costs?
www.redhat.com/carveoutcosts/

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to