~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/logging.cc

  • Committer: Monty Taylor
  • Date: 2009-04-10 18:17:59 UTC
  • mto: (992.1.1 mordred)
  • mto: This revision was merged to the branch mainline in revision 990.
  • Revision ID: mordred@inaugust.com-20090410181759-wr58on1xxc9lwzut
Made plugin registration go through Plugin_registry.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
#include <drizzled/server_includes.h>
21
21
#include <drizzled/logging.h>
22
22
#include <drizzled/gettext.h>
 
23
#include "drizzled/plugin_registry.h"
 
24
 
23
25
#include <vector>
24
26
 
25
27
using namespace std;
26
28
 
27
29
static vector<Logging_handler *> all_loggers;
28
30
 
29
 
static void add_logger(Logging_handler *handler)
 
31
void add_logger(Logging_handler *handler)
30
32
{
31
33
  all_loggers.push_back(handler);
32
34
}
33
35
 
34
 
static void remove_logger(Logging_handler *handler)
 
36
void remove_logger(Logging_handler *handler)
35
37
{
36
38
  all_loggers.erase(find(all_loggers.begin(), all_loggers.end(), handler));
37
39
}
52
54
    }
53
55
  }
54
56
 
 
57
  Plugin_registry &registry= Plugin_registry::get_plugin_registry();
55
58
  if (p != NULL)
56
 
    add_logger(p);
 
59
    registry.registerPlugin(p);
57
60
  plugin->data= p;
58
61
 
59
62
  return 0;