removed type: from log lines

This commit is contained in:
Henry Oswald 2014-10-20 14:22:31 +01:00
parent 7ba6689ea0
commit 9be31a2ac1
4 changed files with 6 additions and 7 deletions

View file

@ -90,7 +90,7 @@ module.exports = ProjectController =
user = req.session.user user = req.session.user
projectName = req.body.projectName?.trim() projectName = req.body.projectName?.trim()
template = req.body.template template = req.body.template
logger.log user: user, type: template, name: projectName, "creating project" logger.log user: user, projectType: template, name: projectName, "creating project"
async.waterfall [ async.waterfall [
(cb)-> (cb)->
if template == 'example' if template == 'example'
@ -99,10 +99,10 @@ module.exports = ProjectController =
projectCreationHandler.createBasicProject user._id, projectName, cb projectCreationHandler.createBasicProject user._id, projectName, cb
], (err, project)-> ], (err, project)->
if err? if err?
logger.error err: err, project: project, user: user, name: projectName, type: template, "error creating project" logger.error err: err, project: project, user: user, name: projectName, templateType: template, "error creating project"
res.send 500 res.send 500
else else
logger.log project: project, user: user, name: projectName, type: template, "created project" logger.log project: project, user: user, name: projectName, templateType: template, "created project"
res.send {project_id:project._id} res.send {project_id:project._id}

View file

@ -306,7 +306,7 @@ module.exports = ProjectEntityHandler =
deleteEntity: (project_id, entity_id, entityType, callback = (error) ->)-> deleteEntity: (project_id, entity_id, entityType, callback = (error) ->)->
self = @ self = @
logger.log entity_id:entity_id, type:entityType, project_id:project_id, "deleting project entity" logger.log entity_id:entity_id, entityType:entityType, project_id:project_id, "deleting project entity"
if !entityType? if !entityType?
logger.err err: "No entityType set", project_id: project_id, entity_id: entity_id logger.err err: "No entityType set", project_id: project_id, entity_id: entity_id
return callback("No entityType set") return callback("No entityType set")

View file

@ -36,7 +36,7 @@ module.exports =
type = 'doc' type = 'doc'
else if element.folders? else if element.folders?
type = 'folder' type = 'folder'
logger.log project_id:project_id, path:path, type:type, element:element, "processing update to delete entity from tpds" logger.log project_id:project_id, updateType:path, updateType:type, element:element, "processing update to delete entity from tpds"
editorController.deleteEntity project_id, element._id, type, source, (err)-> editorController.deleteEntity project_id, element._id, type, source, (err)->
logger.log project_id:project_id, path:path, "finished processing update to delete entity from tpds" logger.log project_id:project_id, path:path, "finished processing update to delete entity from tpds"
callback() callback()

View file

@ -83,8 +83,7 @@ ProjectSchema.statics.putElement = (project_id, folder_id, element, type, callba
mongo: path.mongo # TODO: This is not correct mongo: path.mongo # TODO: This is not correct
if err? if err?
callback(err) callback(err)
logger.log project_id: project_id, element_id: element._id, type: type, folder_id: folder_id, logger.log project_id: project_id, element_id: element._id, fileType: type, folder_id: folder_id, "adding element to project"
"adding element to project"
id = element._id+'' id = element._id+''
element._id = concreteObjectId(id) element._id = concreteObjectId(id)
conditions = _id:project_id conditions = _id:project_id