fix(module_log): limit module sync log size to 1MB

If log size bigger than 1MB, it will be auto slice to 0.5MB
省略前面的日志，应该放前面吧

Sent from my iPhone

> On Nov 2, 2014, at 11:43 AM, Yiyu He <notifications@github.com> wrote:
> 
> In services/module_log.js:
> 
> > @@ -35,7 +37,15 @@ exports.append = function* (id, log) {
> >    if (!row) {
> >      return null;
> >    }
> > -  row.log += '\n' + log;
> > +
> > +  if (row.log) {
> > +    row.log += '\n' + log;
> > +  } else {
> > +    row.log = log;
> > +  }
> > +  if (row.log.length >= ONE_MB) {
> > +    row.log = '...\n' + row.log.substring(ONE_MB / 2);
> 看上去应该是 row.log.substring(ONE_MB / 2); + '...\n' ？
> 
> —
> Reply to this email directly or view it on GitHub.