mirror of
				https://github.com/42wim/matterbridge.git
				synced 2025-11-03 23:37:24 +01:00 
			
		
		
		
	Add support for DEBUG=1 envvar to enable debug. Closes #283
This commit is contained in:
		
							parent
							
								
									b7a8c6b60f
								
							
						
					
					
						commit
						b461fc5e40
					
				@ -7,6 +7,7 @@ import (
 | 
			
		||||
	"github.com/42wim/matterbridge/gateway"
 | 
			
		||||
	log "github.com/Sirupsen/logrus"
 | 
			
		||||
	"github.com/google/gops/agent"
 | 
			
		||||
	"os"
 | 
			
		||||
	"strings"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
@ -33,7 +34,7 @@ func main() {
 | 
			
		||||
		fmt.Printf("version: %s %s\n", version, githash)
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
	if *flagDebug {
 | 
			
		||||
	if *flagDebug || os.Getenv("DEBUG") == "1" {
 | 
			
		||||
		log.Info("Enabling debug")
 | 
			
		||||
		log.SetLevel(log.DebugLevel)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user