Closed NewbieAngular closed 6 years ago
I am looking for a logger app that would write to file remotely, writing in batches helps performance
Yes it does.
Multiple writes in the same tick are always batched up and written in the next tick.
From quiet, the first log write(s) happens immediately and close the file. If other logs pile up behind it they are queued and written out in the next batch. This lets us get the writes on to disk as soon as possible whilst also allowing us to write as fast as possible.
With network systems, we do use filesystem timestamps for the time-based rotations, this might cause problems over some networked systems (like windows fileshare) although I haven't tested with this.
Thanks for the quick response ..
Is the batch size configurable? And, Can I override $Log of Angular to use this?
Hmm browser side logging isn't what this module's geared for - more server side only, which is why it's a separate module and not part of core.
So I'm not sure about the $Log and Angular thing.
As for batch size, it writes everything outstanding in the next batch. So if writing a batch for some reason takes 10 seconds, all the logs accrued in those 10 seconds will be written in the next batch.
That said, a batch is:
Does this write to log file in batches? say 50 log statements in one batch? considering performance.