镜像来自
				https://github.com/therootcompany/greenlock.js.git
				synced 2024-11-16 17:29:00 +00:00 
			
		
		
		
	Allow custom log function. Not only console
This commit is contained in:
		
							父節點
							
								
									b3bb80a480
								
							
						
					
					
						當前提交
						7c62f1fd3e
					
				| @ -2,7 +2,7 @@ | ||||
| 
 | ||||
| var utils = require('./utils'); | ||||
| 
 | ||||
| function log(debug) { | ||||
| function _log(debug) { | ||||
|   if (debug) { | ||||
|     var args = Array.prototype.slice.call(arguments); | ||||
|     args.shift(); | ||||
| @ -15,6 +15,7 @@ module.exports.create = function (le) { | ||||
|   if (!le.challenge || !le.challenge.get) { | ||||
|     throw new Error("middleware requires challenge plugin with get method"); | ||||
|   } | ||||
|   var log = le.log || _log; | ||||
| 
 | ||||
|   log(le.debug, "created middleware"); | ||||
|   return function (_app) { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user