Browse Source

Clear line when writing log to console

master
Con Kolivas 9 years ago
parent
commit
690084b735
  1. 1
      src/ckpool.c

1
src/ckpool.c

@ -84,6 +84,7 @@ void logmsg(int loglevel, const char *fmt, ...) {
tm.tm_min, tm.tm_min,
tm.tm_sec, ms); tm.tm_sec, ms);
if (loglevel <= LOG_WARNING) { if (loglevel <= LOG_WARNING) {
fprintf(stderr, "\33[2K\r");
if (loglevel <= LOG_ERR && errno != 0) if (loglevel <= LOG_ERR && errno != 0)
fprintf(stderr, "%s %s with errno %d: %s\n", stamp, buf, errno, strerror(errno)); fprintf(stderr, "%s %s with errno %d: %s\n", stamp, buf, errno, strerror(errno));
else else

Loading…
Cancel
Save