11 #ifdef LOG4CPP_HAVE_LIBIDSA 14 #include <sys/types.h> 24 const std::string& idsaName) :
25 AppenderSkeleton(name),
37 _idsaConnection=idsa_open((
char *)_idsaName.c_str(), NULL,
42 idsa_close(_idsaConnection);
47 IDSA_EVENT *idsaEvent;
49 idsaEvent = idsa_event(_idsaConnection);
53 idsa_name(idsaEvent,(
char *)event.categoryName.c_str());
54 idsa_scheme(idsaEvent,
"log4cpp");
56 idsa_add_integer(idsaEvent,
"priority", event.priority);
57 idsa_add_string(idsaEvent,
"ndc", (
char *)event.ndc.c_str());
58 idsa_add_string(idsaEvent,
"message",
59 (
char*)event.message.c_str());
61 idsa_log(_idsaConnection,idsaEvent);
82 std::string name, idsa_name;
83 params.get_for(
"idsa appender").required(
"name", name)(
"idsa_name", idsa_name);
85 return std::auto_ptr<Appender>(
new IdsaAppender(name, idsa_name));
89 #endif // LOG4CPP_HAVE_LIBIDSA
std::auto_ptr< Appender > create_idsa_appender(const FactoryParams &)
virtual void setLayout(Layout *layout)
virtual bool requiresLayout() const
virtual void _append(const LoggingEvent &event)
IdsaAppender(const std::string &name, const std::string &idsaName)