Skip to content

evertonantunes/syslog_parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

conan install . --build=missing
cmake CMakeLists.txt
cmake --build . --targe all
   #include <boost/utility/string_view.hpp>
   #include "grammar.hpp"
   #include "message.hpp"

   ...


   using message_t = event::Message;
   grammar::syslog::definitions<boost::string_view::const_iterator, message_t> gramar;
   
   const boost::string_view data = R"(<165>1 2003-10-11T22:14:15.003Z - MyApp - - - Message)";

   auto f = begin(data);
   auto l = end(data);

   message_t event;
   const auto result = boost::spirit::qi::parse(f, l, gramar, event);
   // result == true
   // event.message == "Message"

About

Syslog grammar parser implemented with Boost.Spirit

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published