~ubuntu-branches/ubuntu/quantal/libircclient/quantal

« back to all changes in this revision

Viewing changes to examples/ircmud/log.h

  • Committer: Bazaar Package Importer
  • Author(s): Bradley Smith
  • Date: 2009-01-05 22:46:15 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20090105224615-j4djww5j1gkoy9y8
Tags: 1.3+dfsg1-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * $Id: log.h 17 2004-09-14 18:24:51Z gyunaev $
3
 
 */
4
 
 
5
 
#ifndef INCLUDE_LOG_H
6
 
#define INCLUDE_LOG_H
7
 
 
8
 
 
9
 
class CLog
10
 
{
11
 
        public:
12
 
                CLog();
13
 
                ~CLog();
14
 
 
15
 
                enum llev_t
16
 
                {
17
 
                        FATAL,
18
 
                        ERROR,
19
 
                        INFO,
20
 
                        DEBUG
21
 
                };
22
 
 
23
 
                void Init (unsigned int level, const std::string& path) throw (std::string);
24
 
                void Add  (llev_t level, const char * fmt, ...);
25
 
 
26
 
        private:
27
 
                unsigned int    level;
28
 
                std::ofstream   file;
29
 
                pthread_mutex_t mutex;
30
 
};
31
 
 
32
 
 
33
 
#endif