Skip to content

Commit

Permalink
Merge pull request #3943 from vector-im/rav/reduce_rageshake_size
Browse files Browse the repository at this point in the history
Reduce rageshake log size to 1MB
  • Loading branch information
richvdh authored May 17, 2017
2 parents 338ab4d + 15ab173 commit ca3921f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/vector/rageshake.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,12 @@ import q from "q";
// actually timestamps. We then purge the remaining logs. We also do this
// purge on startup to prevent logs from accumulating.

// the frequency with which we flush to indexeddb
const FLUSH_RATE_MS = 30 * 1000;

// the length of log data we keep in indexeddb (and include in the reports)
const MAX_LOG_SIZE = 1024 * 1024 * 1; // 1 MB

// A class which monkey-patches the global console and stores log lines.
class ConsoleLogger {
constructor() {
Expand Down Expand Up @@ -232,7 +236,6 @@ class IndexedDBLogStore {
* is a big string with all the new-line delimited logs.
*/
async consume() {
const MAX_LOG_SIZE = 1024 * 1024 * 50; // 50 MB
const db = this.db;

// Returns: a string representing the concatenated logs for this ID.
Expand Down

0 comments on commit ca3921f

Please sign in to comment.