Write log to stderr
Be consistent with python's default behavior and play nice with CGI.
This commit is contained in:
		
							
								
								
									
										2
									
								
								logging
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								logging
									
									
									
									
									
								
							| @@ -39,7 +39,7 @@ handlers = console,file | |||||||
| # Console handler | # Console handler | ||||||
| class = StreamHandler | class = StreamHandler | ||||||
| level = INFO | level = INFO | ||||||
| args = (sys.stdout,) | args = (sys.stderr,) | ||||||
| formatter = simple | formatter = simple | ||||||
|  |  | ||||||
| [handler_file] | [handler_file] | ||||||
|   | |||||||
| @@ -55,9 +55,9 @@ def start(name="radicale", filename=None, debug=False): | |||||||
|         # Default configuration, standard output |         # Default configuration, standard output | ||||||
|         if filename: |         if filename: | ||||||
|             logger.warning( |             logger.warning( | ||||||
|                 "Logging configuration file '%s' not found, using stdout." % |                 "Logging configuration file '%s' not found, using stderr." % | ||||||
|                 filename) |                 filename) | ||||||
|         handler = logging.StreamHandler(sys.stdout) |         handler = logging.StreamHandler(sys.stderr) | ||||||
|         handler.setFormatter(logging.Formatter("%(message)s")) |         handler.setFormatter(logging.Formatter("%(message)s")) | ||||||
|         logger.addHandler(handler) |         logger.addHandler(handler) | ||||||
|     if debug: |     if debug: | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Unrud
					Unrud