-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
177 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
|
||
#include <string> | ||
#include <vector> | ||
#include <stdexcept> | ||
|
||
using std::string; | ||
using std::vector; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
target_sources(${PROJECT_NAME} PUBLIC | ||
${TELLO_INCLUDE}/tello/logger/logger.hpp | ||
${TELLO_INCLUDE}/tello/logger/logger_interface.hpp | ||
|
||
PRIVATE | ||
${CMAKE_CURRENT_SOURCE_DIR}/logger_interface.cpp | ||
${CMAKE_CURRENT_SOURCE_DIR}/logger.hpp | ||
${CMAKE_CURRENT_SOURCE_DIR}/logger.cpp) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#pragma once | ||
|
||
#include <string> | ||
#include <memory> | ||
|
||
using std::string; | ||
|
||
namespace spdlog { | ||
class logger; | ||
} | ||
|
||
using spdlog::logger; | ||
|
||
namespace tello { | ||
|
||
enum class LoggerType; | ||
class LoggerSettings; | ||
|
||
class Logger { | ||
public: | ||
Logger() = delete; | ||
|
||
static void info(const LoggerType& loggerType, const string& message, const string& params...); | ||
static void error(const LoggerType& loggerType, const string& message, const string& params...); | ||
static void warn(const LoggerType& loggerType, const string& message, const string& params...); | ||
static void initialize(const LoggerSettings& settings); | ||
|
||
private: | ||
static std::shared_ptr<logger> _commandLogger; | ||
static std::shared_ptr<logger> _videoLogger; | ||
static std::shared_ptr<logger> _statusLogger; | ||
|
||
static std::shared_ptr<logger> logger(const LoggerType& loggerType); | ||
}; | ||
} |
Oops, something went wrong.