~linuxjedi/libdrizzle/5.1-prep-stmt-cleanup

« back to all changes in this revision

Viewing changes to libdrizzle/drizzle_local.h

  • Committer: Andrew Hutchings
  • Date: 2012-12-22 08:55:58 UTC
  • mfrom: (43.2.18 5.0)
  • Revision ID: andrew@linuxjedi.co.uk-20121222085558-b3aj47q2ah3cfccg
Merge 5.0 into 5.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
 * @param[in] format Format and variable argument list of message.
60
60
 */
61
61
DRIZZLE_LOCAL
62
 
void drizzle_con_set_error(drizzle_con_st *con, const char *function,
 
62
void drizzle_set_error(drizzle_st *con, const char *function,
63
63
                       const char *format, ...);
64
64
 
65
65
/**
71
71
 * @param[in] args Variable argument list that has been initialized.
72
72
 */
73
73
DRIZZLE_LOCAL
74
 
void drizzle_con_log(drizzle_con_st *con, drizzle_verbose_t verbose,
 
74
void drizzle_log(drizzle_st *con, drizzle_verbose_t verbose,
75
75
                 const char *format, va_list args);
76
76
 
77
77
/**
78
78
 * Log a fatal message, see drizzle_log() for argument details.
79
79
 */
80
 
static inline void drizzle_log_fatal(drizzle_con_st *con, const char *format,
 
80
static inline void drizzle_log_fatal(drizzle_st *con, const char *format,
81
81
                                     ...)
82
82
{
83
83
  va_list args;
85
85
  if (con->verbose >= DRIZZLE_VERBOSE_FATAL)
86
86
  {
87
87
    va_start(args, format);
88
 
    drizzle_con_log(con, DRIZZLE_VERBOSE_FATAL, format, args);
 
88
    drizzle_log(con, DRIZZLE_VERBOSE_FATAL, format, args);
89
89
    va_end(args);
90
90
  }
91
91
}
93
93
/**
94
94
 * Log an error message, see drizzle_log() for argument details.
95
95
 */
96
 
static inline void drizzle_log_error(drizzle_con_st *con, const char *format,
 
96
static inline void drizzle_log_error(drizzle_st *con, const char *format,
97
97
                                     ...)
98
98
{
99
99
  va_list args;
101
101
  if (con->verbose >= DRIZZLE_VERBOSE_ERROR)
102
102
  {
103
103
    va_start(args, format);
104
 
    drizzle_con_log(con, DRIZZLE_VERBOSE_ERROR, format, args);
 
104
    drizzle_log(con, DRIZZLE_VERBOSE_ERROR, format, args);
105
105
    va_end(args);
106
106
  }
107
107
}
109
109
/**
110
110
 * Log an info message, see drizzle_log() for argument details.
111
111
 */
112
 
static inline void drizzle_log_info(drizzle_con_st *con, const char *format,
 
112
static inline void drizzle_log_info(drizzle_st *con, const char *format,
113
113
                                    ...)
114
114
{
115
115
  va_list args;
117
117
  if (con->verbose >= DRIZZLE_VERBOSE_INFO)
118
118
  {
119
119
    va_start(args, format);
120
 
    drizzle_con_log(con, DRIZZLE_VERBOSE_INFO, format, args);
 
120
    drizzle_log(con, DRIZZLE_VERBOSE_INFO, format, args);
121
121
    va_end(args);
122
122
  }
123
123
}
125
125
/**
126
126
 * Log a debug message, see drizzle_log() for argument details.
127
127
 */
128
 
static inline void drizzle_log_debug(drizzle_con_st *con, const char *format,
 
128
static inline void drizzle_log_debug(drizzle_st *con, const char *format,
129
129
                                     ...)
130
130
{
131
131
  va_list args;
133
133
  if (con->verbose >= DRIZZLE_VERBOSE_DEBUG)
134
134
  {
135
135
    va_start(args, format);
136
 
    drizzle_con_log(con, DRIZZLE_VERBOSE_DEBUG, format, args);
 
136
    drizzle_log(con, DRIZZLE_VERBOSE_DEBUG, format, args);
137
137
    va_end(args);
138
138
  }
139
139
}
141
141
/**
142
142
 * Log a crazy message, see drizzle_log() for argument details.
143
143
 */
144
 
static inline void drizzle_log_crazy(drizzle_con_st *con, const char *format,
 
144
static inline void drizzle_log_crazy(drizzle_st *con, const char *format,
145
145
                                     ...)
146
146
{
147
147
  va_list args;
149
149
  if (con->verbose >= DRIZZLE_VERBOSE_CRAZY)
150
150
  {
151
151
    va_start(args, format);
152
 
    drizzle_con_log(con, DRIZZLE_VERBOSE_CRAZY, format, args);
 
152
    drizzle_log(con, DRIZZLE_VERBOSE_CRAZY, format, args);
153
153
    va_end(args);
154
154
  }
155
155
}