51 const char* log_file = getenv(
"JAMI_LOG_FILE");
54 jami::Logger::setFileLog(log_file);
69 manager.isIOSExtension =
true;
72 manager.syncOnRegister =
false;
81start(
const std::filesystem::path& config_file)
noexcept
81start(
const std::filesystem::path& config_file)
noexcept {
…}
101 jami::Logger::fini();
105logging(
const std::string& whom,
const std::string& action)
noexcept
107 if (
"syslog" == whom) {
108 jami::Logger::setSysLog(not action.empty());
109 }
else if (
"console" == whom) {
110 jami::Logger::setConsoleLog(not action.empty());
111 }
else if (
"monitor" == whom) {
112 jami::Logger::setMonitorLog(not action.empty());
113 }
else if (
"file" == whom) {
114 jami::Logger::setFileLog(action);
116 JAMI_ERR(
"Bad log handler %s", whom.c_str());
105logging(
const std::string& whom,
const std::string& action)
noexcept {
…}
124 asio::post(*
io, std::move(cb));
static LIBJAMI_TEST_EXPORT Manager & instance()
static std::atomic_bool initialized
void init(const std::filesystem::path &config_file, libjami::InitFlag flags)
Initialisation of thread (sound) and map.
void post(std::function< void()> cb)
SignalHandlerMap & getSignalHandlers()
LIBJAMI_PUBLIC bool start(const std::filesystem::path &config_file={}) noexcept
Start asynchronously daemon created by init().
LIBJAMI_PUBLIC void logging(const std::string &whom, const std::string &action) noexcept
Control log handlers.
enum LIBJAMI_PUBLIC enum LIBJAMI_PUBLIC io
LIBJAMI_PUBLIC bool init(enum InitFlag flags) noexcept
Initialize globals, create underlaying daemon.
LIBJAMI_PUBLIC bool initialized() noexcept
LIBJAMI_PUBLIC void fini() noexcept
Stop and freeing any resource allocated by daemon.
@ LIBJAMI_FLAG_CONSOLE_LOG
@ LIBJAMI_FLAG_IOS_EXTENSION
@ LIBJAMI_FLAG_AUTOANSWER
@ LIBJAMI_FLAG_NO_AUTOSYNC