-/* $Id: filter_log.cpp,v 1.11 2006-01-04 11:55:31 adam Exp $
+/* $Id: filter_log.cpp,v 1.15 2006-01-11 11:51:49 adam Exp $
Copyright (c) 2005, Index Data.
%LICENSE%
#include "config.hpp"
-#include "filter.hpp"
-#include "router.hpp"
#include "package.hpp"
#include <string>
yf::Log::~Log() {}
-void yf::Log::process(Package &package) const
+void yf::Log::process(yp2::Package &package) const
{
Z_GDU *gdu;
}
}
+void yf::Log::configure(const xmlNode *ptr)
+{
+ for (ptr = ptr->children; ptr; ptr = ptr->next)
+ {
+ if (ptr->type != XML_ELEMENT_NODE)
+ continue;
+ if (!strcmp((const char *) ptr->name, "message"))
+ m_p->m_msg = yp2::xml::get_text(ptr);
+ else
+ {
+ throw yp2::filter::FilterException("Bad element "
+ + std::string((const char *)
+ ptr->name));
+ }
+ }
+}
+
static yp2::filter::Base* filter_creator()
{
return new yp2::filter::Log;