| 56 | } |
| 57 | |
| 58 | void TailEventLog::onSchedule(const std::shared_ptr<core::ProcessContext> &context, const std::shared_ptr<core::ProcessSessionFactory> &sessionFactory) { |
| 59 | std::string value; |
| 60 | |
| 61 | if (context->getProperty(LogSourceFileName.getName(), value)) { |
| 62 | log_source_ = value; |
| 63 | } |
| 64 | if (context->getProperty(MaxEventsPerFlowFile.getName(), value)) { |
| 65 | core::Property::StringToInt(value, max_events_); |
| 66 | } |
| 67 | |
| 68 | log_handle_ = OpenEventLog(NULL, log_source_.c_str()); |
| 69 | |
| 70 | logger_->log_trace("TailEventLog configured to tail %s",log_source_); |
| 71 | |
| 72 | } |
| 73 | |
| 74 | void TailEventLog::onTrigger(const std::shared_ptr<core::ProcessContext> &context, const std::shared_ptr<core::ProcessSession> &session) { |
| 75 |
nothing calls this directly
no test coverage detected