24 #ifndef LAUNCHER_PLUGINS_LOGGER_HPP
25 #define LAUNCHER_PLUGINS_LOGGER_HPP
33 #include <boost/any.hpp>
34 #include <boost/function.hpp>
35 #include <Optional.hpp>
37 #include <system/User.hpp>
42 namespace launcher_plugins {
51 namespace launcher_plugins {
59 class ILogDestination;
120 std::string cleanDelimiters(
const std::string& in_str);
127 void setProgramId(
const std::string& in_programId);
136 void addLogDestination(
const std::shared_ptr<ILogDestination>& in_destination);
149 void addLogDestination(
const std::shared_ptr<ILogDestination>& in_destination,
const std::string& in_section);
156 bool hasFileLogDestination();
163 bool hasStderrLogDestination();
179 std::string cleanDelims(
const std::string& in_toClean);
189 void logError(
const Error& in_error);
211 void logErrorAsWarning(
const Error& in_error);
221 void logErrorAsInfo(
const Error& in_error);
231 void logErrorAsDebug(
const Error& in_error);
242 void logErrorMessage(
const std::string& in_message,
const std::string& in_section = std::string());
253 void logErrorMessage(
const std::string& in_message,
const ErrorLocation& in_loggedFrom);
266 void logErrorMessage(
const std::string& in_message,
267 const std::string& in_section,
280 void logWarningMessage(
const std::string& in_message,
const std::string& in_section = std::string());
291 void logWarningMessage(
const std::string& in_message,
const ErrorLocation& in_loggedFrom);
304 void logWarningMessage(
const std::string& in_message,
305 const std::string& in_section,
318 void logDebugMessage(
const std::string& in_message,
const std::string& in_section = std::string());
329 void logDebugMessage(
const std::string& in_message,
const ErrorLocation& in_loggedFrom);
342 void logDebugMessage(
const std::string& in_message,
343 const std::string& in_section,
357 const std::string& in_section = std::string());
368 void logInfoMessage(
const std::string& in_message,
const std::string& in_section = std::string());
379 void logInfoMessage(
const std::string& in_message,
const ErrorLocation& in_loggedFrom);
392 void logInfoMessage(
const std::string& in_message,
393 const std::string& in_section,
405 void logPassthroughMessage(
const std::string& in_source,
const std::string& in_message);
424 void removeLogDestination(
const std::string& in_destinationId,
const std::string& in_section = std::string());
430 void removeReloadableLogDestinations();
440 std::ostream& writeError(
const Error& in_error, std::ostream& io_os);
448 std::string writeError(
const Error& in_error);