Esempio n. 1
0
 def setUp(self):
     self.orig_default_client = CLIENT_HOLDER.global_config.get('default')
     client = CLIENT_HOLDER.get_client(self.client_name)
     client_config = {
         'sender_class': 'metlog.senders.DebugCaptureSender',
     }
     self.client = client_from_dict_config(client_config, client)
     CLIENT_HOLDER.set_default_client_name(self.client_name)
Esempio n. 2
0
 def setUp(self):
     self.orig_default_client = CLIENT_HOLDER.global_config.get('default')
     client = CLIENT_HOLDER.get_client(self.client_name)
     client_config = {
         'sender_class': 'metlog.senders.DebugCaptureSender',
         }
     self.client = client_from_dict_config(client_config, client)
     CLIENT_HOLDER.set_default_client_name(self.client_name)
    def setUp(self):
        self.orig_default_client = CLIENT_HOLDER.global_config.get('default')

        client = CLIENT_HOLDER.get_client(self.client_name)

        client_config = {'sender_class': 'metlog.senders.DebugCaptureSender',
                'plugins': {'plugin_section_name':
                    ('metlog_raven.raven_plugin:config_plugin',
                        {'dsn': 'udp://*****:*****@somehost.com:5000/2'})}
                    }
        self.client = client_from_dict_config(client_config, client)
        CLIENT_HOLDER.set_default_client_name(self.client_name)
    def setUp(self):
        self.orig_default_client = CLIENT_HOLDER.global_config.get('default')

        client = CLIENT_HOLDER.get_client(self.client_name)

        self.dsn = "udp://*****:*****@somehost.com:9000/2"
        client_config = {'sender_class': 'metlog.senders.DebugCaptureSender',
                'plugins': {'plugin_section_name':
                    ['metlog_raven.raven_plugin:config_plugin',
                        {'dsn': self.dsn}]
                    }}
        self.client = client_from_dict_config(client_config, client)
        CLIENT_HOLDER.set_default_client_name(self.client_name)
Esempio n. 5
0
def setup_metlog(config_dict, default=False):
    """
    Instantiate a Metlog client and add it to the client holder.

    :param config_dict: Dictionary object containing the metlog client
                        configuration.
    :param default: Should this be specified as CLIENT_HOLDER's default
                    client? Note that the first client to be added will
                    automatically be specified as the default, regardless
                    of the value of this argument.
    """
    name = config_dict.get('logger', '')
    client = CLIENT_HOLDER.get_client(name)
    client = client_from_dict_config(config_dict, client)
    if default:
        CLIENT_HOLDER.set_default_client_name(name)
Esempio n. 6
0
def setup_metlog(config_dict, default=False):
    """
    Instantiate a Metlog client and add it to the client holder.

    :param config_dict: Dictionary object containing the metlog client
                        configuration.
    :param default: Should this be specified as CLIENT_HOLDER's default
                    client? Note that the first client to be added will
                    automatically be specified as the default, regardless
                    of the value of this argument.
    """
    name = config_dict.get('logger', '')
    client = CLIENT_HOLDER.get_client(name)
    client = client_from_dict_config(config_dict, client)
    if default:
        CLIENT_HOLDER.set_default_client_name(name)
    def setUp(self):
        self.orig_default_client = CLIENT_HOLDER.global_config.get('default')

        client = CLIENT_HOLDER.get_client(self.client_name)

        client_config = {
            'sender_class': 'metlog.senders.DebugCaptureSender',
            'plugins': {
                'plugin_section_name':
                ('metlog_raven.raven_plugin:config_plugin', {
                    'dsn': 'udp://*****:*****@somehost.com:5000/2'
                })
            }
        }
        self.client = client_from_dict_config(client_config, client)
        CLIENT_HOLDER.set_default_client_name(self.client_name)
    def setUp(self):
        self.orig_default_client = CLIENT_HOLDER.global_config.get('default')

        client = CLIENT_HOLDER.get_client(self.client_name)

        self.dsn = "udp://*****:*****@somehost.com:9000/2"
        client_config = {
            'sender_class': 'metlog.senders.DebugCaptureSender',
            'plugins': {
                'plugin_section_name':
                ['metlog_raven.raven_plugin:config_plugin', {
                    'dsn': self.dsn
                }]
            }
        }
        self.client = client_from_dict_config(client_config, client)
        CLIENT_HOLDER.set_default_client_name(self.client_name)
Esempio n. 9
0
 def tearDown(self):
     del CLIENT_HOLDER._clients[self.client_name]
     CLIENT_HOLDER.set_default_client_name(self.orig_default_client)
     timed_add._client = None
Esempio n. 10
0
 def tearDown(self):
     del CLIENT_HOLDER._clients[self.client_name]
     CLIENT_HOLDER.set_default_client_name(self.orig_default_client)