mirror of
https://github.com/Theldus/alertik.git
synced 2024-11-21 23:43:23 +01:00
Fix stdout
This commit is contained in:
parent
e2b5df4567
commit
97a3b0b00d
12
alertik.c
12
alertik.c
@ -27,7 +27,7 @@
|
||||
#define LOG_FILE "log/log.txt"
|
||||
|
||||
/* Uncomment/comment to enable/disable the following settings. */
|
||||
#define USE_FILE_AS_LOG /* stdout if commented. */
|
||||
// #define USE_FILE_AS_LOG /* stdout if commented. */
|
||||
// #define CURL_VERBOSE
|
||||
// #define VALIDATE_CERTS
|
||||
// #define DISABLE_NOTIFICATIONS
|
||||
@ -437,18 +437,18 @@ int main(void)
|
||||
TELEGRAM_CHAT_ID = getenv("TELEGRAM_CHAT_ID");
|
||||
TELEGRAM_NICKNAME = getenv("TELEGRAM_NICKNAME");
|
||||
|
||||
#ifndef USE_FILE_AS_LOG
|
||||
curr_file = STDOUT_FILENO;
|
||||
#endif
|
||||
|
||||
if (!TELEGRAM_BOT_TOKEN || !TELEGRAM_CHAT_ID || !TELEGRAM_NICKNAME) {
|
||||
panic("Unable to find env vars, please check if you have all of the\n"
|
||||
panic("Unable to find env vars, please check if you have all of the"
|
||||
"following set:\n"
|
||||
"- TELEGRAM_BOT_TOKEN\n"
|
||||
"- TELEGRAM_CHAT_ID\n"
|
||||
"- TELEGRAM_NICKNAME\n");
|
||||
}
|
||||
|
||||
#ifndef USE_FILE_AS_LOG
|
||||
curr_file = STDOUT_FILENO;
|
||||
#endif
|
||||
|
||||
log_msg("Alertik v%s started...\n", ALERTIK_VERSION);
|
||||
|
||||
fd = create_socket();
|
||||
|
Loading…
Reference in New Issue
Block a user