Export the logger (again)

Just enabling or disabling logging falls short of the power of
interfaces of go. A user is forced to either accept the logging to
stderr in the format defined by xgb or disable logging alltogether. By
exporting the logger, we can actually let the user decide where to log
in what format.
This commit is contained in:
Axel Wagner
2013-08-23 01:16:12 +02:00
committed by Přemysl Janouch
parent 38b293e74d
commit 2104b8fcdf
3 changed files with 18 additions and 99 deletions

View File

@@ -33,8 +33,8 @@ func (c *Conn) connect(display string) error {
authName, authData, err := readAuthority(c.host, c.display)
noauth := false
if err != nil {
logger.Printf("Could not get authority info: %v", err)
logger.Println("Trying connection without authority info...")
Logger.Printf("Could not get authority info: %v", err)
Logger.Println("Trying connection without authority info...")
authName = ""
authData = []byte{}
noauth = true