Last active
September 21, 2021 11:08
-
-
Save zulonas/19681eb4e4029b216f0494e551c478a7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <syslog.h> | |
#define LOG(FORMAT, ...) {\ | |
openlog(NULL, LOG_CONS | LOG_PID | LOG_NDELAY, LOG_LOCAL1);\ | |
syslog(LOG_INFO, "%s:%d " FORMAT "\n", __BASE_FILE__, __LINE__, ##__VA_ARGS__);\ | |
closelog();\ | |
} | |
int main() | |
{ | |
LOG("asd"); | |
LOG("%s", "zxc"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment