feat: log level from environment is recognised case-insensitively
Signed-off-by: Christopher Arndt <chris@chrisarndt.de>
This commit is contained in:
		
							parent
							
								
									d3579b6e0f
								
							
						
					
					
						commit
						da31628d86
					
				@ -141,9 +141,7 @@ def main(args=None):
 | 
			
		||||
    args = ap.parse_args(args)
 | 
			
		||||
 | 
			
		||||
    logging.basicConfig(
 | 
			
		||||
        level=getattr(
 | 
			
		||||
            logging, "DEBUG" if args.verbose else os.environ.get("PLUGIN_LOG_LEVEL", "INFO")
 | 
			
		||||
        ),
 | 
			
		||||
        level="DEBUG" if args.verbose else os.environ.get("PLUGIN_LOG_LEVEL", "INFO").upper(),
 | 
			
		||||
        format=os.environ.get("PLUGIN_LOG_FORMAT", "%(levelname)s: %(message)s"),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user