YUKI Hiroshi
null+****@clear*****
Mon Nov 12 16:55:43 JST 2012
YUKI Hiroshi 2012-11-12 16:55:43 +0900 (Mon, 12 Nov 2012) New Revision: b617ddbe7a8eb96def28d094b079969ee83b69a0 https://github.com/groonga/gcs/commit/b617ddbe7a8eb96def28d094b079969ee83b69a0 Log: Don't initialize winston multiple times Modified files: test/test-utils.js Modified: test/test-utils.js (+9 -5) =================================================================== --- test/test-utils.js 2012-11-12 16:42:56 +0900 (585b09f) +++ test/test-utils.js 2012-11-12 16:55:43 +0900 (d84b458) @@ -19,12 +19,16 @@ exports.testBaseHost = testBaseHost; exports.testConfigurationHost = testConfigurationHost; exports.testPort = testPort; +var logOutputInitialized = false; function setupServer(context, extraOptions) { - var options = { context: context, - port: testPort, - accessLogPath: resolve('test/tmp/access.log'), - queryLogPath: resolve('test/tmp/query.log'), - errorLogPath: resolve('test/tmp/error.log') }; + var options = { context: context, + port: testPort }; + if (!logOutputInitialized) { + options.accessLogPath = resolve('test/tmp/access.log'); + options.queryLogPath = resolve('test/tmp/query.log'); + options.errorLogPath = resolve('test/tmp/error.log'); + logOutputInitialized = false; + } if (extraOptions) Object.keys(extraOptions).forEach(function(key) { options[key] = extraOptions[key]; -------------- next part -------------- HTML����������������������������... Télécharger