~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/pbms/src/cslib/CSLog.h

  • Committer: lbieber
  • Date: 2010-10-06 16:34:16 UTC
  • mfrom: (1816.1.3 build)
  • Revision ID: lbieber@orisndriz08-20101006163416-ea0sl59qgpglk21y
Merge Monty - Change the requirement from either libinnodb to libhaildb. Also, tied it to version 2.2
Merge Andrew - fix bug 650935: remove --compress from all clients
Merge Andrew - fix bug 653471: Add -A to drizzle client
Merge Travis - 621861 = To change C structs to C++ classes in Drizzle

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (C) 2008 PrimeBase Technologies GmbH, Germany
 
1
/* Copyright (c) 2008 PrimeBase Technologies GmbH, Germany
2
2
 *
3
3
 * PrimeBase Media Stream for MySQL
4
4
 *
29
29
#ifndef __CSLOG_H__
30
30
#define __CSLOG_H__
31
31
 
32
 
#include <stdio.h>
33
 
#include <stdarg.h>
 
32
using namespace std;
34
33
 
 
34
#include "stdio.h"
35
35
 
36
36
#include "CSDefs.h"
37
37
#include "CSString.h"
47
47
                iStream(s),
48
48
                iHeaderPending(true),
49
49
                iLogLevel(level),
 
50
                iLockThread(0),
50
51
                iLockCount(0)
51
52
                 {
52
53
                pthread_mutex_init(&iMutex, NULL);
53
 
                memset(&iLockThread, 0, sizeof(iLockThread));
54
54
        }
55
55
 
56
56
        virtual ~CSLog() {
57
 
                memset(&iLockThread, 0, sizeof(iLockThread));
 
57
                iLockThread = 0;
58
58
                iLockCount = 0;
59
59
                pthread_mutex_destroy(&iMutex);
60
60
        }
88
88
        void eol(CSThread *self, int level);
89
89
 
90
90
        void logLine(CSThread *self, int level, const char *buffer);
91
 
        void log_va(CSThread *self, int level, const char *func, const char *file, int line, const char *fmt, va_list ap);
92
 
        void logf(CSThread *self, int level, const char *fmt, ...);
93
 
        void logf(CSThread *self, int level, const char *func, const char *file, int line, const char *fmt, ...);
94
91
        
95
92
        void flush() {fflush(iStream);}
96
93
private: