Просмотр исходного кода

modify the top level logger name to 'growi'

Yuki Takei 8 лет назад
Родитель
Сommit
6792d218bc
43 измененных файлов с 53 добавлено и 54 удалено
  1. 1 1
      bin/search.js
  2. 1 1
      bin/util.js
  3. 11 12
      config/logger/config.dev.js
  4. 1 1
      lib/crowi/dev.js
  5. 1 1
      lib/crowi/express-init.js
  6. 1 1
      lib/crowi/index.js
  7. 1 1
      lib/events/page.js
  8. 1 1
      lib/events/user.js
  9. 1 1
      lib/models/attachment.js
  10. 1 1
      lib/models/bookmark.js
  11. 1 1
      lib/models/comment.js
  12. 1 1
      lib/models/config.js
  13. 1 1
      lib/models/external-account.js
  14. 1 1
      lib/models/page-group-relation.js
  15. 1 1
      lib/models/page.js
  16. 1 1
      lib/models/revision.js
  17. 1 1
      lib/models/updatePost.js
  18. 1 1
      lib/models/user-group-relation.js
  19. 1 1
      lib/models/user-group.js
  20. 1 1
      lib/models/user.js
  21. 1 1
      lib/plugins/plugin.service.js
  22. 1 1
      lib/routes/admin.js
  23. 1 1
      lib/routes/attachment.js
  24. 1 1
      lib/routes/bookmark.js
  25. 1 1
      lib/routes/comment.js
  26. 1 1
      lib/routes/installer.js
  27. 1 1
      lib/routes/login-passport.js
  28. 1 1
      lib/routes/login.js
  29. 1 1
      lib/routes/me.js
  30. 1 1
      lib/routes/page.js
  31. 1 1
      lib/routes/revision.js
  32. 1 1
      lib/routes/search.js
  33. 1 1
      lib/service/passport.js
  34. 1 1
      lib/util/fileUploader.js
  35. 1 1
      lib/util/googleAuth.js
  36. 1 1
      lib/util/mailer.js
  37. 1 1
      lib/util/middlewares.js
  38. 1 1
      lib/util/search.js
  39. 1 1
      lib/util/slack.js
  40. 1 1
      lib/util/swigFunctions.js
  41. 1 1
      local_modules/crowi-fileupload-aws/index.js
  42. 1 1
      local_modules/crowi-fileupload-local/index.js
  43. 1 1
      local_modules/crowi-fileupload-none/index.js

+ 1 - 1
bin/search.js

@@ -1,6 +1,6 @@
 
 var program = require('commander')
-  , debug = require('debug')('crowi:console:search-util')
+  , debug = require('debug')('growi:console:search-util')
   , colors = require('colors')
   , crowi = new (require('../lib/crowi'))(__dirname + '/../', process.env)
   ;

+ 1 - 1
bin/util.js

@@ -1,5 +1,5 @@
 var program = require('commander')
-  , debug = require('debug')('crowi:console:util')
+  , debug = require('debug')('growi:console:util')
   , colors = require('colors')
   , crowi = new (require('../lib/crowi'))(__dirname + '/../', process.env)
   ;

+ 11 - 12
config/logger/config.dev.js

@@ -2,17 +2,16 @@ module.exports = {
   default: 'info',
 
   //// configure level for name
-  // 'crowi:*': 'debug',
   // 'express:*': 'debug',
-  // 'crowi:*': 'debug',
-  'crowi:crowi': 'debug',
-  // 'crowi:crowi:dev': 'debug',
-  'crowi:crowi:express-init': 'debug',
-  'crowi:models:external-account': 'debug',
-  // 'crowi:routes:login': 'debug',
-  'crowi:routes:login-passport': 'debug',
-  'crowi:service:PassportService': 'debug',
-  // 'crowi:routes:page': 'debug',
-  // 'crowi:plugins:*': 'debug',
-  // 'crowi:InterceptorManager': 'debug',
+  // 'growi:*': 'debug',
+  'growi:crowi': 'debug',
+  // 'growi:crow:dev': 'debug',
+  'growi:crowi:express-init': 'debug',
+  'growi:models:external-account': 'debug',
+  // 'growi:routes:login': 'debug',
+  'growi:routes:login-passport': 'debug',
+  'growi:service:PassportService': 'debug',
+  // 'growi:routes:page': 'debug',
+  // 'growi:plugins:*': 'debug',
+  // 'growi:InterceptorManager': 'debug',
 };

+ 1 - 1
lib/crowi/dev.js

@@ -1,4 +1,4 @@
-const debug = require('debug')('crowi:crowi:dev');
+const debug = require('debug')('growi:crowi:dev');
 const fs = require('fs');
 const path = require('path');
 

+ 1 - 1
lib/crowi/express-init.js

@@ -1,7 +1,7 @@
 'use strict';
 
 module.exports = function(crowi, app) {
-  var debug = require('debug')('crowi:crowi:express-init')
+  var debug = require('debug')('growi:crowi:express-init')
     , path           = require('path')
     , express        = require('express')
     , bodyParser     = require('body-parser')

+ 1 - 1
lib/crowi/index.js

@@ -1,7 +1,7 @@
 'use strict';
 
 
-var debug = require('debug')('crowi:crowi')
+var debug = require('debug')('growi:crowi')
   , pkg = require('@root/package.json')
   , path = require('path')
   , sep = path.sep

+ 1 - 1
lib/events/page.js

@@ -1,4 +1,4 @@
-var debug = require('debug')('crowi:events:page');
+var debug = require('debug')('growi:events:page');
 var util = require('util');
 var events = require('events');
 

+ 1 - 1
lib/events/user.js

@@ -1,4 +1,4 @@
-var debug = require('debug')('crowi:events:user');
+var debug = require('debug')('growi:events:user');
 var util = require('util');
 var events = require('events');
 

+ 1 - 1
lib/models/attachment.js

@@ -1,5 +1,5 @@
 module.exports = function(crowi) {
-  var debug = require('debug')('crowi:models:attachment')
+  var debug = require('debug')('growi:models:attachment')
     , mongoose = require('mongoose')
     , ObjectId = mongoose.Schema.Types.ObjectId
     , fileUploader = require('../util/fileUploader')(crowi)

+ 1 - 1
lib/models/bookmark.js

@@ -1,5 +1,5 @@
 module.exports = function(crowi) {
-  var debug = require('debug')('crowi:models:bookmark')
+  var debug = require('debug')('growi:models:bookmark')
     , mongoose = require('mongoose')
     , ObjectId = mongoose.Schema.Types.ObjectId
     , bookmarkSchema;

+ 1 - 1
lib/models/comment.js

@@ -1,5 +1,5 @@
 module.exports = function(crowi) {
-  var debug = require('debug')('crowi:models:comment')
+  var debug = require('debug')('growi:models:comment')
     , mongoose = require('mongoose')
     , ObjectId = mongoose.Schema.Types.ObjectId
     , USER_PUBLIC_FIELDS = '_id image isGravatarEnabled googleId name username email status createdAt' // TODO: どこか別の場所へ...

+ 1 - 1
lib/models/config.js

@@ -1,6 +1,6 @@
 module.exports = function(crowi) {
   var mongoose = require('mongoose')
-    , debug = require('debug')('crowi:models:config')
+    , debug = require('debug')('growi:models:config')
     , uglifycss = require('uglifycss')
     , ObjectId = mongoose.Schema.Types.ObjectId
     , configSchema

+ 1 - 1
lib/models/external-account.js

@@ -1,4 +1,4 @@
-const debug = require('debug')('crowi:models:external-account');
+const debug = require('debug')('growi:models:external-account');
 const mongoose = require('mongoose');
 const mongoosePaginate = require('mongoose-paginate');
 const uniqueValidator = require('mongoose-unique-validator');

+ 1 - 1
lib/models/page-group-relation.js

@@ -1,4 +1,4 @@
-const debug = require('debug')('crowi:models:pageGroupRelation');
+const debug = require('debug')('growi:models:pageGroupRelation');
 const mongoose = require('mongoose');
 const mongoosePaginate = require('mongoose-paginate');
 const ObjectId = mongoose.Schema.Types.ObjectId;

+ 1 - 1
lib/models/page.js

@@ -1,5 +1,5 @@
 module.exports = function(crowi) {
-  var debug = require('debug')('crowi:models:page')
+  var debug = require('debug')('growi:models:page')
     , mongoose = require('mongoose')
     , escapeStringRegexp = require('escape-string-regexp')
     , ObjectId = mongoose.Schema.Types.ObjectId

+ 1 - 1
lib/models/revision.js

@@ -1,5 +1,5 @@
 module.exports = function(crowi) {
-  var debug = require('debug')('crowi:models:revision')
+  var debug = require('debug')('growi:models:revision')
     , mongoose = require('mongoose')
     , Xss = require('../util/xss')
     , ObjectId = mongoose.Schema.Types.ObjectId

+ 1 - 1
lib/models/updatePost.js

@@ -2,7 +2,7 @@
  * This is the setting for notify to 3rd party tool (like Slack).
  */
 module.exports = function(crowi) {
-  var debug = require('debug')('crowi:models:updatePost')
+  var debug = require('debug')('growi:models:updatePost')
     , mongoose = require('mongoose')
     , ObjectId = mongoose.Schema.Types.ObjectId
   ;

+ 1 - 1
lib/models/user-group-relation.js

@@ -1,4 +1,4 @@
-const debug = require('debug')('crowi:models:userGroupRelation');
+const debug = require('debug')('growi:models:userGroupRelation');
 const mongoose = require('mongoose');
 const mongoosePaginate = require('mongoose-paginate');
 const ObjectId = mongoose.Schema.Types.ObjectId;

+ 1 - 1
lib/models/user-group.js

@@ -1,4 +1,4 @@
-const debug = require('debug')('crowi:models:userGroup');
+const debug = require('debug')('growi:models:userGroup');
 const mongoose = require('mongoose');
 const mongoosePaginate = require('mongoose-paginate');
 const ObjectId = mongoose.Schema.Types.ObjectId;

+ 1 - 1
lib/models/user.js

@@ -1,5 +1,5 @@
 module.exports = function(crowi) {
-  var debug = require('debug')('crowi:models:user')
+  var debug = require('debug')('growi:models:user')
     , mongoose = require('mongoose')
     , mongoosePaginate = require('mongoose-paginate')
     , uniqueValidator = require('mongoose-unique-validator')

+ 1 - 1
lib/plugins/plugin.service.js

@@ -1,4 +1,4 @@
-const debug = require('debug')('crowi:plugins:PluginService');
+const debug = require('debug')('growi:plugins:PluginService');
 const PluginUtils = require('./plugin-utils');
 
 class PluginService {

+ 1 - 1
lib/routes/admin.js

@@ -1,7 +1,7 @@
 module.exports = function(crowi, app) {
   'use strict';
 
-  var debug = require('debug')('crowi:routes:admin')
+  var debug = require('debug')('growi:routes:admin')
     , fs = require('fs')
     , models = crowi.models
     , Page = models.Page

+ 1 - 1
lib/routes/attachment.js

@@ -1,7 +1,7 @@
 module.exports = function(crowi, app) {
   'use strict';
 
-  var debug = require('debug')('crowi:routs:attachment')
+  var debug = require('debug')('growi:routs:attachment')
     , Attachment = crowi.model('Attachment')
     , User = crowi.model('User')
     , Page = crowi.model('Page')

+ 1 - 1
lib/routes/bookmark.js

@@ -1,7 +1,7 @@
 module.exports = function(crowi, app) {
   'use strict';
 
-  var debug = require('debug')('crowi:routes:bookmark')
+  var debug = require('debug')('growi:routes:bookmark')
     , Bookmark = crowi.model('Bookmark')
     , Page = crowi.model('Page')
     , User = crowi.model('User')

+ 1 - 1
lib/routes/comment.js

@@ -1,7 +1,7 @@
 module.exports = function(crowi, app) {
   'use strict';
 
-  var debug = require('debug')('crowi:routs:comment')
+  var debug = require('debug')('growi:routs:comment')
     , Comment = crowi.model('Comment')
     , User = crowi.model('User')
     , Page = crowi.model('Page')

+ 1 - 1
lib/routes/installer.js

@@ -1,7 +1,7 @@
 module.exports = function(crowi, app) {
   'use strict';
 
-  var debug = require('debug')('crowi:routes:installer')
+  var debug = require('debug')('growi:routes:installer')
     , path = require('path')
     , fs = require('graceful-fs')
     , models = crowi.models

+ 1 - 1
lib/routes/login-passport.js

@@ -1,7 +1,7 @@
 module.exports = function(crowi, app) {
   'use strict';
 
-  var debug = require('debug')('crowi:routes:login-passport')
+  var debug = require('debug')('growi:routes:login-passport')
     , passport = require('passport')
     , config = crowi.getConfig()
     , Config = crowi.model('Config')

+ 1 - 1
lib/routes/login.js

@@ -2,7 +2,7 @@ module.exports = function(crowi, app) {
   'use strict';
 
   var googleapis = require('googleapis')
-    , debug = require('debug')('crowi:routes:login')
+    , debug = require('debug')('growi:routes:login')
     , async    = require('async')
     , passport = require('passport')
     , config = crowi.getConfig()

+ 1 - 1
lib/routes/me.js

@@ -1,7 +1,7 @@
 module.exports = function(crowi, app) {
   'use strict';
 
-  var debug = require('debug')('crowi:routes:me')
+  var debug = require('debug')('growi:routes:me')
     , fs = require('fs')
     , models = crowi.models
     , config = crowi.getConfig()

+ 1 - 1
lib/routes/page.js

@@ -1,7 +1,7 @@
 module.exports = function(crowi, app) {
   'use strict';
 
-  var debug = require('debug')('crowi:routes:page')
+  var debug = require('debug')('growi:routes:page')
     , Page = crowi.model('Page')
     , User = crowi.model('User')
     , Config   = crowi.model('Config')

+ 1 - 1
lib/routes/revision.js

@@ -1,7 +1,7 @@
 module.exports = function(crowi, app) {
   'use strict';
 
-  var debug = require('debug')('crowi:routes:revision')
+  var debug = require('debug')('growi:routes:revision')
     , Page = crowi.model('Page')
     , Revision = crowi.model('Revision')
     , ApiResponse = require('../util/apiResponse')

+ 1 - 1
lib/routes/search.js

@@ -1,7 +1,7 @@
 module.exports = function(crowi, app) {
   'use strict';
 
-  var debug = require('debug')('crowi:routes:search')
+  var debug = require('debug')('growi:routes:search')
     , Page = crowi.model('Page')
     , User = crowi.model('User')
     , ApiResponse = require('../util/apiResponse')

+ 1 - 1
lib/service/passport.js

@@ -1,4 +1,4 @@
-const debug = require('debug')('crowi:service:PassportService');
+const debug = require('debug')('growi:service:PassportService');
 const passport = require('passport');
 const LocalStrategy = require('passport-local').Strategy;
 const LdapStrategy = require('passport-ldapauth');

+ 1 - 1
lib/util/fileUploader.js

@@ -5,7 +5,7 @@
 module.exports = function(crowi) {
   'use strict';
 
-  var debug = require('debug')('crowi:lib:fileUploader')
+  var debug = require('debug')('growi:lib:fileUploader')
     , method = crowi.env.FILE_UPLOAD || 'aws'
     , lib = '../../local_modules/crowi-fileupload-' + method;
 

+ 1 - 1
lib/util/googleAuth.js

@@ -7,7 +7,7 @@ module.exports = function(config) {
 
   const { GoogleApis } = require('googleapis');
   var google = new GoogleApis()
-    , debug = require('debug')('crowi:lib:googleAuth')
+    , debug = require('debug')('growi:lib:googleAuth')
     , lib = {}
     ;
 

+ 1 - 1
lib/util/mailer.js

@@ -5,7 +5,7 @@
 module.exports = function(crowi) {
   'use strict';
 
-  var debug = require('debug')('crowi:lib:mailer')
+  var debug = require('debug')('growi:lib:mailer')
     , nodemailer = require('nodemailer')
     , swig = require('swig-templates')
     , Config = crowi.model('Config')

+ 1 - 1
lib/util/middlewares.js

@@ -1,4 +1,4 @@
-var debug = require('debug')('crowi:lib:middlewares');
+var debug = require('debug')('growi:lib:middlewares');
 var md5 = require('md5');
 
 exports.csrfKeyGenerator = function(crowi, app) {

+ 1 - 1
lib/util/search.js

@@ -3,7 +3,7 @@
  */
 
 var elasticsearch = require('elasticsearch'),
-  debug = require('debug')('crowi:lib:search');
+  debug = require('debug')('growi:lib:search');
 
 function SearchClient(crowi, esUri) {
   this.DEFAULT_OFFSET = 0;

+ 1 - 1
lib/util/slack.js

@@ -7,7 +7,7 @@ module.exports = function(crowi) {
 
   const SLACK_URL = 'https://slack.com';
 
-  const debug = require('debug')('crowi:util:slack'),
+  const debug = require('debug')('growi:util:slack'),
     config = crowi.getConfig(),
     Config = crowi.model('Config'),
     Slack = require('slack-node'),

+ 1 - 1
lib/util/swigFunctions.js

@@ -1,5 +1,5 @@
 module.exports = function(crowi, app, req, locals) {
-  var debug = require('debug')('crowi:lib:swigFunctions')
+  var debug = require('debug')('growi:lib:swigFunctions')
     , Page = crowi.model('Page')
     , Config = crowi.model('Config')
     , User = crowi.model('User')

+ 1 - 1
local_modules/crowi-fileupload-aws/index.js

@@ -6,7 +6,7 @@ module.exports = function(crowi) {
   var aws = require('aws-sdk')
     , fs = require('fs')
     , path = require('path')
-    , debug = require('debug')('crowi:lib:fileUploaderAws')
+    , debug = require('debug')('growi:lib:fileUploaderAws')
     , lib = {}
     , getAwsConfig = function() {
         var config = crowi.getConfig();

+ 1 - 1
local_modules/crowi-fileupload-local/index.js

@@ -3,7 +3,7 @@
 module.exports = function(crowi) {
   'use strict';
 
-  var debug = require('debug')('crowi:lib:fileUploaderLocal')
+  var debug = require('debug')('growi:lib:fileUploaderLocal')
     , fs = require('fs')
     , path = require('path')
     , mkdir = require('mkdirp')

+ 1 - 1
local_modules/crowi-fileupload-none/index.js

@@ -3,7 +3,7 @@
 module.exports = function(crowi) {
   'use strict';
 
-  var debug = require('debug')('crowi:lib:fileUploaderNone')
+  var debug = require('debug')('growi:lib:fileUploaderNone')
     , Config = crowi.model('Config')
     , config = crowi.getConfig()
     , lib = {};