libutil++  1.9.3
 All Classes Functions Variables
SimpleLogFormat.h
1 /*
2 ** libutil++
3 ** $Id: SimpleLogFormat.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__SimpleLogFormat_H__
10 #define __libutilxx__sella__util__SimpleLogFormat_H__
11 
12 #include "../../common.h"
13 #include "../Exception.h"
14 #include "LogFormat.h"
15 
16 #include <sys/time.h>
17 
18 #include <string>
19 
20 namespace sella {
21  namespace util {
22  class SimpleLogFormat;
23  class Log;
24  }
25 }
26 
28  friend class Log;
29 
30  public:
31  SimpleLogFormat() throw () : LogFormat(DEFAULTSTAMPFORMAT, true) {}; /* Workaround for initialization order issue. */
32 
33  public:
34  virtual sella::util::SimpleLogFormat* 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 
42 #endif
43 
44 /*
45 ** vim: noet ts=3 sw=3
46 */