more verbose logger setup
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
		
			
				
	
				Run linting on the backend code / Build (pull_request) Has been cancelled
				
			
		
			
				
	
				Run testing on the backend code / Build (pull_request) Has been cancelled
				
			
		
			
				
	
				Build and deploy the backend to staging / Build and push image (pull_request) Successful in 2m32s
				
			
		
			
				
	
				Build and deploy the backend to staging / Deploy to staging (pull_request) Successful in 16s
				
			
		
		
	
	
				
					
				
			
		
			Some checks failed
		
		
	
	Run linting on the backend code / Build (pull_request) Has been cancelled
				
			Run testing on the backend code / Build (pull_request) Has been cancelled
				
			Build and deploy the backend to staging / Build and push image (pull_request) Successful in 2m32s
				
			Build and deploy the backend to staging / Deploy to staging (pull_request) Successful in 16s
				
			This commit is contained in:
		
							
								
								
									
										3
									
								
								.vscode/settings.json
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.vscode/settings.json
									
									
									
									
										vendored
									
									
								
							| @@ -1,3 +0,0 @@ | ||||
| { | ||||
|     "cmake.ignoreCMakeListsMissing": true | ||||
| } | ||||
 Submodule backend/deployment updated: 4f0a0289fc...904f16bfc0
									
								
							| @@ -21,11 +21,19 @@ debug = os.getenv('DEBUG', "false") == "true" | ||||
| if os.getenv('KUBERNETES_SERVICE_HOST', None) is not None: | ||||
|     # in that case we want to log to stdout and also to loki | ||||
|     from loki_logger_handler.loki_logger_handler import LokiLoggerHandler | ||||
|     loki_url = os.getenv('LOKI_URL') | ||||
|     if loki_url is None: | ||||
|         raise ValueError("LOKI_URL environment variable is not set") | ||||
|      | ||||
|     loki_handler = LokiLoggerHandler( | ||||
|         url=os.getenv('LOKI_URL', 'http://loki:3100'), | ||||
|         labels={'app': 'anyway', 'env': 'production' if debug else 'staging'} | ||||
|         url = loki_url, | ||||
|         labels = {'app': 'anyway', 'environment': 'production' if debug else 'staging'} | ||||
|     ) | ||||
|     print(f"Logging to Loki at {loki_url} with {loki_handler.labels} and {debug=}") | ||||
|     if debug: | ||||
|         # we need to silence the debug logs made by the loki handler | ||||
|         logging.getLogger('urllib3.connectionpool').setLevel(logging.INFO) | ||||
|  | ||||
|         logging.basicConfig( | ||||
|             level=logging.DEBUG, | ||||
|             handlers=[loki_handler, logging.StreamHandler()] | ||||
|   | ||||
		Reference in New Issue
	
	Block a user