logger := stdlog.GetFromFlags()
logger.Info("Connecting to the server...")
logger.Errorf("Connection failed: %q", err)
Will output:
2014-04-02 18:09:15.862 INFO Connecting to the API...
2014-04-02 18:10:14.347 ERROR Connection failed (Server is unavailable).