Permalink
Browse files

flush to logfile at the end of each json object

  • Loading branch information...
1 parent 1514ba4 commit 23e1fc8b96f5efff43e55f853b902104c26396fe @tmm1 tmm1 committed Apr 28, 2010
Showing with 2 additions and 0 deletions.
  1. +2 −0 ext/memprof.c
View
@@ -345,6 +345,8 @@ json_print(void *ctx, const char * str, unsigned int len)
written += fwrite(str + written, sizeof(char), len - written, out ? out : stdout);
if (written == len) break;
}
+ if (str[0] == '\n' && out)
+ fflush(out);
}
static VALUE

0 comments on commit 23e1fc8

Please sign in to comment.