Abuse Melding

Je hebt een klacht over de onderstaande posting:

14-04-2021, 23:15 door Anoniem

@ anoniem van 19:45 var os = require('os') var http = require('http') var fs = require('fs') var pump = require('pump') var speedometer = require('speedometer') var CircularAppendFile = require('circular-append-file') // capture the last 10 minutes of stats const HISTORY_LIMIT = 60 const HISTORY_INTERVAL = 10e3 const LOG_FILE_PATH = './diagnostics-server.log' const LOG_SIZE_LIMIT = 1024 /* 1kb */ * 1024 /* 1mb */ * 32 /* 32mb */ var queriesSpeed = speedometer() var multicastQueriesSpeed = speedometer() var queriesPS = [] var multicastQueriesPS = [] exports.createServer = function (disc, opts = {}) { // logging var logFile = CircularAppendFile(LOG_FILE_PATH, {maxSize: LOG_SIZE_LIMIT}) function track (evt) { disc.on(evt, (...args) => { logFile.append(renderLogEntry(evt, (new Date()).toLocaleString(), args)) }) } track('traffic') track('secrets-rotated') track('error') track('listening') track('close') track('peer') // stats disc.on('traffic', (type) => { if (type ...

Beschrijf je klacht (Optioneel):

captcha