Code

Belarusian translation for 0.47, by Hleb Valoshka
[inkscape.git] / src / debug / logger.cpp
index 5d62f9a88149c185dcf734694faeb30ea1b268f0..f28d2750bdd7f00d051a40ecef722928dc57a200 100644 (file)
@@ -12,6 +12,7 @@
 #include <fstream>
 #include <vector>
 #include <glib/gmessages.h>
+#include "inkscape-version.h"
 #include "debug/logger.h"
 #include "debug/simple-event.h"
 #include "gc-alloc.h"
@@ -127,6 +128,15 @@ static void set_category_mask(bool * const mask, char const *filter) {
     }
 }
 
+typedef SimpleEvent<Event::CORE> CoreEvent;
+
+class SessionEvent : public CoreEvent {
+public:
+    SessionEvent() : CoreEvent(Util::share_static_string("session")) {
+        _addProperty("inkscape-version", Inkscape::version_string);
+    }
+};
+
 }
 
 void Logger::init() {
@@ -140,7 +150,7 @@ void Logger::init() {
                 log_stream << "<?xml version=\"1.0\"?>\n";
                 log_stream.flush();
                 _enabled = true;
-                start<SimpleEvent<Event::CORE> >(Util::share_static_string("session"));
+                start<SessionEvent>();
                 std::atexit(&do_shutdown);
             }
         }
@@ -170,6 +180,8 @@ void Logger::_start(Event const &event) {
 
     tag_stack().push_back(name);
     empty_tag = true;
+
+    event.generateChildEvents();
 }
 
 void Logger::_skip() {