Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define LOGFILE "/tmp/log.txt"
- static void logmsg(const char* fmt, ...) {
- va_list ap;
- va_start(ap, fmt);
- FILE *out = fopen(LOGFILE, "a");
- if (out) {
- vfprintf(out, fmt, ap);
- fclose(out);
- }
- va_end(ap);
- }
Add Comment
Please, Sign In to add comment