libutil++  1.9.3
 All Classes Functions Variables
MixedLogFormat.h
1 /*
2 ** libutil++
3 ** $Id: MixedLogFormat.h 1653 2016-02-28 19:54:59Z sella $
4 ** Copyright (c) 2011-2016 Digital Genesis, LLC. All Rights Reserved.
5 ** Released under the LGPL Version 2.1 License.
6 ** http://www.digitalgenesis.com
7 */
8 
9 #ifndef __libutilxx__sella__util__MixedLogFormat_H__
10 #define __libutilxx__sella__util__MixedLogFormat_H__
11 
12 #include "../../common.h"
13 #include "../Exception.h"
14 #include "LogFormat.h"
15 
16 #include <syslog.h>
17 #include <sys/time.h>
18 
19 #include <string>
20 
21 namespace sella {
22  namespace util {
23  class MixedLogFormat;
24  class Log;
25  }
26 }
27 
29  friend class Log;
30 
31  public:
32  MixedLogFormat(int threshold = LOG_WARNING) throw ();
33 
34  virtual sella::util::MixedLogFormat* clone(void) const throw ();
35 
36  protected:
37  virtual const std::string format(int priority, const char *stamp, const char *func, const char *file, int line, const sella::Exception &e, const char *message) throw ();
38  virtual const std::string format(int priority, const char *stamp, const char *func, const char *file, int line, const char *message) throw ();
39  virtual const std::string format(int priority, const char *stamp, const char *func, const char *file, int line, const char *option, const char *message) throw ();
40 
41  protected:
42  int threshold;
43 };
44 
45 #endif
46 
47 /*
48 ** vim: noet ts=3 sw=3
49 */