Merge pull request #78 from overleaf/spd-such-logs

Don't log document lines in log messages
This commit is contained in:
Simon Detheridge 2019-08-02 12:27:49 +01:00 committed by GitHub
commit ad485709cf
2 changed files with 12 additions and 15 deletions

View file

@ -6,8 +6,9 @@ http = require("http")
Settings = require('settings-sharelatex')
logger = require('logger-sharelatex')
logger.initialize("document-updater")
logger.logger.serializers.docs = require("./app/js/LoggerSerializers").docs
logger.logger.serializers.files = require("./app/js/LoggerSerializers").files
logger.logger.addSerializers(require("./app/js/LoggerSerializers"))
if Settings.sentry?.dsn?
logger.initializeErrorReporting(Settings.sentry.dsn)

View file

@ -1,14 +1,10 @@
module.exports =
docs: (docs) ->
docs.map (doc) ->
{
path: doc.path
id: doc.doc
}
showLength = (thing) ->
"length: #{thing?.length}"
files: (files) ->
files.map (file) ->
{
path: file.path
id: file.file
}
module.exports =
# replace long values with their length
lines: showLength
oldLines: showLength
newLines: showLength
ranges: showLength
update: showLength