logging basicconig marcsello edition
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build is passing
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	continuous-integration/drone/push Build is passing
				
			This commit is contained in:
		@@ -1,4 +1,5 @@
 | 
			
		||||
#!/usr/bin/env python3
 | 
			
		||||
import sys
 | 
			
		||||
import json
 | 
			
		||||
import logging
 | 
			
		||||
 | 
			
		||||
@@ -69,7 +70,8 @@ def on_message(channel, method_frame, header_frame, body):
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
if __name__ == "__main__":
 | 
			
		||||
    logging.basicConfig(level="DEBUG")
 | 
			
		||||
    logging.basicConfig(stream=sys.stdout, format="%(asctime)s - %(name)s [%(levelname)s]: %(message)s",
 | 
			
		||||
                        level=logging.DEBUG if '--debug' in sys.argv else logging.INFO)
 | 
			
		||||
    logging.info("Guard service starting")
 | 
			
		||||
    mqtt = MQTT()
 | 
			
		||||
    mqtt.topic = config.MQTT_TOPIC
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user