Add log widget to lower dock
[frida/frida.git] / src / gui / widgets / LogDockAppender.hxx
1 #ifndef INCLUDE__LogDockAppender_hxx_
2 #define INCLUDE__LogDockAppender_hxx_
3
4 #include <log4cxx/appenderskeleton.h>
5 #include <log4cxx/spi/loggingevent.h>
6 #include <log4cxx/helpers/strftimedateformat.h>
7
8 class LogDock;
9
10 using namespace log4cxx;
11
12 class LogDockAppender : public AppenderSkeleton {
13 public:
14 LogDockAppender();
15
16 void setTarget(LogDock* target);
17 void append(const spi::LoggingEventPtr& event, helpers::Pool& p);
18 void close();
19 bool requiresLayout() const;
20
21 DECLARE_LOG4CXX_OBJECT(LogDockAppender)
22 BEGIN_LOG4CXX_CAST_MAP()
23 LOG4CXX_CAST_ENTRY(LogDockAppender)
24 LOG4CXX_CAST_ENTRY_CHAIN(AppenderSkeleton)
25 END_LOG4CXX_CAST_MAP()
26 private:
27 LogDock* target;
28 helpers::StrftimeDateFormat timeformat;
29 };
30
31 LOG4CXX_PTR_DEF(LogDockAppender);
32
33 #endif /* INCLUDE__LogDockAppender_hxx_ */