Beispiel #1
0
def get_plugin_manager():
    if get_settings().get_plugins_enabled():
        from yapsy.PluginManager import PluginManagerSingleton
        return PluginManagerSingleton.get()
    else:
        from lunchinator.log import getCoreLogger
        getCoreLogger().exception("Cannnot load plugin manager: plugins are disabled")   
Beispiel #2
0
def get_connection_type(logger, name=None):
    from lunchinator.log import getCoreLogger
    if not get_settings().get_plugins_enabled():
        getCoreLogger().warning("Plugins are disabled, cannot get DB connections.")
        return None
    
    pluginInfo = get_plugin_manager().getPluginByName("Database Settings", "general")
    if pluginInfo and pluginInfo.plugin_object.is_activated:
        return pluginInfo.plugin_object.getConnectionType(logger, name)
    getCoreLogger().error("getDBConnection: DB Connections plugin not yet loaded")
    return None
Beispiel #3
0
def logs_debug():
    from log import getCoreLogger
    import logging
    return getCoreLogger().isEnabledFor(logging.DEBUG)
Beispiel #4
0
def log_debug(*s):
    from log import getCoreLogger
    getCoreLogger().debug(_generate_string(*s))
Beispiel #5
0
def log_info(*s):
    from log import getCoreLogger
    getCoreLogger().info(_generate_string(*s))
Beispiel #6
0
def log_warning(*s):
    from log import getCoreLogger
    getCoreLogger().warn(_generate_string(*s))
Beispiel #7
0
def log_error(*s):
    from log import getCoreLogger
    getCoreLogger().error(_generate_string(*s))
Beispiel #8
0
def log_critical(*s):
    from log import getCoreLogger
    getCoreLogger().critical(_generate_string(*s))
Beispiel #9
0
def log_exception(*s):
    from log import getCoreLogger
    getCoreLogger().exception(_generate_string(*s))