~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/service/logging.cc

Renamed namespace slot to namespace service.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 */
19
19
 
20
20
#include <drizzled/server_includes.h>
21
 
#include <drizzled/slot/logging.h>
 
21
#include <drizzled/service/logging.h>
22
22
#include <drizzled/gettext.h>
23
23
#include "drizzled/plugin/registry.h"
24
24
 
27
27
using namespace drizzled;
28
28
using namespace std;
29
29
 
30
 
void slot::Logging::add(plugin::Logging *handler)
 
30
void service::Logging::add(plugin::Logging *handler)
31
31
{
32
32
  if (handler != NULL)
33
33
    all_loggers.push_back(handler);
34
34
}
35
35
 
36
 
void slot::Logging::remove(plugin::Logging *handler)
 
36
void service::Logging::remove(plugin::Logging *handler)
37
37
{
38
38
  if (handler != NULL)
39
39
    all_loggers.erase(find(all_loggers.begin(), all_loggers.end(), handler));
42
42
 
43
43
namespace drizzled
44
44
{
45
 
namespace slot
 
45
namespace service
46
46
{
47
47
namespace logging_priv
48
48
{
96
96
};
97
97
 
98
98
} /* namespace logging_priv */
99
 
} /* namespace slot */
 
99
} /* namespace service */
100
100
} /* namespace drizzled */
101
101
 
102
102
 
103
103
/* This is the logging_pre_do entry point.
104
104
   This gets called by the rest of the Drizzle server code */
105
 
bool slot::Logging::pre_do(Session *session)
 
105
bool service::Logging::pre_do(Session *session)
106
106
{
107
107
  /* Use find_if instead of foreach so that we can collect return codes */
108
108
  vector<plugin::Logging *>::iterator iter=
109
109
    find_if(all_loggers.begin(), all_loggers.end(),
110
 
            slot::logging_priv::PreIterate(session)); 
 
110
            service::logging_priv::PreIterate(session)); 
111
111
  /* If iter is == end() here, that means that all of the plugins returned
112
112
   * false, which in this case means they all succeeded. Since we want to 
113
113
   * return false on success, we return the value of the two being != 
117
117
 
118
118
/* This is the logging_post_do entry point.
119
119
   This gets called by the rest of the Drizzle server code */
120
 
bool slot::Logging::post_do(Session *session)
 
120
bool service::Logging::post_do(Session *session)
121
121
{
122
122
  /* Use find_if instead of foreach so that we can collect return codes */
123
123
  vector<plugin::Logging *>::iterator iter=
124
124
    find_if(all_loggers.begin(), all_loggers.end(),
125
 
            slot::logging_priv::PostIterate(session)); 
 
125
            service::logging_priv::PostIterate(session)); 
126
126
  /* If iter is == end() here, that means that all of the plugins returned
127
127
   * false, which in this case means they all succeeded. Since we want to 
128
128
   * return false on success, we return the value of the two being !=