Skip to content
This repository has been archived by the owner on Oct 5, 2021. It is now read-only.

Color #8

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ namespace core
int _LOGMSG_len = (int)strlen(#TASK);\
int _LOGMSG_adj = (16-_LOGMSG_len)%2 ? 0 : 1;\
fprintf(stderr, "%s[ %*c%s%*c ]\t" COLOR_NORMAL msg "\n", \
(angry ? COLOR_RED : COLOR_GREEN), \
(angry == 0) ? COLOR_GREEN : ((angry == 1) ? COLOR_RED : COLOR_CYAN), \
(16-_LOGMSG_len)/2, ' ', #TASK, \
(16-_LOGMSG_len)/2 - _LOGMSG_adj, ' '\
__VA_OPT__(,) __VA_ARGS__);\
} while(0)

#endif
#endif
2 changes: 1 addition & 1 deletion src/watchdog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ int main()
{
if (sigcaught) { // use of many functions (like fprintf) is limited inside signal handlers, so do it here
putchar('\n');
LOGMSG(watchdog, 1, "!!! Caught SIGINT, will exit on next occurence!");
LOGMSG(watchdog, 2, "!!! Caught SIGINT, will exit on next occurence!");
sigcaught = 0;
}

Expand Down