diff --git a/.gitignore b/.gitignore index 5fc445c..ed0bbaa 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,6 @@ Temporary Items # Bot token .token + +# CLion projects +.idea diff --git a/include/telebot-private.h b/include/telebot-private.h index 27d023f..dba79f6 100644 --- a/include/telebot-private.h +++ b/include/telebot-private.h @@ -43,8 +43,8 @@ #ifdef DEBUG - #define ERR(fmt, args...) printf("[ERROR][%s:%d]" fmt "\n", __func__, __LINE__, ##args) - #define DBG(fmt, args...) printf("[DEBUG][%s:%d]" fmt "\n", __func__, __LINE__, ##args) + #define ERR(fmt, args...) fprintf(stderr, "[ERROR][%s:%d]" fmt "\n", __func__, __LINE__, ##args) + #define DBG(fmt, args...) fprintf(stderr, "[DEBUG][%s:%d]" fmt "\n", __func__, __LINE__, ##args) #else #define ERR(x, ...) #define DBG(x, ...) diff --git a/src/telebot-api.c b/src/telebot-api.c index e699ecb..5a7bc8d 100644 --- a/src/telebot-api.c +++ b/src/telebot-api.c @@ -86,7 +86,7 @@ telebot_error_e telebot_start(telebot_update_cb_f update_cb) ret = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); if (ret != 0) { - ERR("Failed to set pthread detatched attribute, error: %d", errno); + ERR("Failed to set pthread detached attribute, error: %d", errno); return TELEBOT_ERROR_OPERATION_FAILED; }