osquery-1/osquery/logger.h

38 lines
1.2 KiB
C
Raw Normal View History

2014-07-31 00:35:19 +00:00
// Copyright 2004-present Facebook. All Rights Reserved.
#ifndef OSQUERY_LOGGER_H
#define OSQUERY_LOGGER_H
#include <future>
#include <string>
#include <vector>
#include "osquery/status.h"
2014-07-31 00:35:19 +00:00
#include "osquery/database.h"
2014-08-15 07:25:30 +00:00
namespace osquery {
namespace logger {
2014-07-31 00:35:19 +00:00
// kDefaultLogReceiverName is a const std::string which represents the "name"
// of the default log receiver
extern const std::string kDefaultLogReceiverName;
// logString accepts a const reference to a string and logs it to a specified
// upstream receiver. If no receiver is specified, it will fail back to what
// was defined via the command-line flags. If none was defined, it will fail
// back to using the default log receiver.
osquery::Status logString(const std::string& s);
2014-08-15 07:25:30 +00:00
osquery::Status logString(const std::string& s, const std::string& receiver);
2014-07-31 00:35:19 +00:00
// logScheduledQueryLogItem accepts a const reference to a
// ScheduledQueryLogItem struct and logs it to a specified upstream receiver.
osquery::Status logScheduledQueryLogItem(
2014-08-15 07:25:30 +00:00
const osquery::db::ScheduledQueryLogItem& item);
osquery::Status logScheduledQueryLogItem(
2014-08-15 07:25:30 +00:00
const osquery::db::ScheduledQueryLogItem& item,
const std::string& receiver);
}
}
2014-07-31 00:35:19 +00:00
#endif /* OSQUERY_LOGGER_H */