mirror of
https://github.com/JHUAPL/kami.git
synced 2026-01-09 14:58:02 -05:00
Refactored agents
This commit is contained in:
@@ -2,14 +2,14 @@
|
||||
* TODO FILEHEADER
|
||||
*/
|
||||
|
||||
#include <kami/agent.h>
|
||||
#include <kami/config.h>
|
||||
#include <spdlog/sinks/stdout_color_sinks.h>
|
||||
#include <spdlog/spdlog.h>
|
||||
|
||||
#include <CLI/App.hpp>
|
||||
#include <CLI/Config.hpp>
|
||||
#include <CLI/Formatter.hpp>
|
||||
#include <kami/agent.h>
|
||||
#include <kami/config.h>
|
||||
#include <string>
|
||||
|
||||
using namespace kami;
|
||||
@@ -21,12 +21,15 @@ int main(int argc, char **argv) {
|
||||
auto console = spdlog::stdout_color_st(ident);
|
||||
string logLevelOption = "info";
|
||||
|
||||
app.add_option("-l", logLevelOption, "Set the logging level")->check(CLI::IsMember(SPDLOG_LEVEL_NAMES));
|
||||
app.add_option("-l", logLevelOption, "Set the logging level")
|
||||
->check(CLI::IsMember(SPDLOG_LEVEL_NAMES));
|
||||
CLI11_PARSE(app, argc, argv);
|
||||
|
||||
console->set_level(spdlog::level::from_str(logLevelOption));
|
||||
console->info("Compiled with Kami/{}, log level {}", KAMI_VERSION_STRING, logLevelOption);
|
||||
console->info("Compiled with Kami/{}, log level {}", KAMI_VERSION_STRING,
|
||||
logLevelOption);
|
||||
|
||||
Agent testAgent;
|
||||
console->debug("Successfully created Agent with ID {}", testAgent.getAgentID().toString());
|
||||
console->debug("Successfully created Agent with ID {}",
|
||||
testAgent.getAgentID().toString());
|
||||
}
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
* TODO FILEHEADER
|
||||
*/
|
||||
|
||||
#include <kami/agent.h>
|
||||
#include <kami/config.h>
|
||||
#include <spdlog/sinks/stdout_color_sinks.h>
|
||||
#include <spdlog/spdlog.h>
|
||||
|
||||
#include <CLI/App.hpp>
|
||||
#include <CLI/Config.hpp>
|
||||
#include <CLI/Formatter.hpp>
|
||||
#include <kami/agent.h>
|
||||
#include <kami/config.h>
|
||||
#include <string>
|
||||
|
||||
using namespace kami;
|
||||
@@ -21,12 +21,15 @@ int main(int argc, char **argv) {
|
||||
auto console = spdlog::stdout_color_st(ident);
|
||||
string logLevelOption = "info";
|
||||
|
||||
app.add_option("-l", logLevelOption, "Set the logging level")->check(CLI::IsMember(SPDLOG_LEVEL_NAMES));
|
||||
app.add_option("-l", logLevelOption, "Set the logging level")
|
||||
->check(CLI::IsMember(SPDLOG_LEVEL_NAMES));
|
||||
CLI11_PARSE(app, argc, argv);
|
||||
|
||||
console->set_level(spdlog::level::from_str(logLevelOption));
|
||||
console->info("Compiled with Kami/{}, log level {}", KAMI_VERSION_STRING, logLevelOption);
|
||||
console->info("Compiled with Kami/{}, log level {}", KAMI_VERSION_STRING,
|
||||
logLevelOption);
|
||||
|
||||
AgentID testAgentID;
|
||||
console->debug("Successfully created AgentID with ID {}", testAgentID.toString());
|
||||
console->debug("Successfully created AgentID with ID {}",
|
||||
testAgentID.to_string());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user