Commit 6e272050 authored by Jacob Marble's avatar Jacob Marble

Improve user communication

Fill in TODO in README to reflect GitHub address. Add consistent
product+version report to stdout on all tools. Connector gets
stdout and glog.

Change-Id: I55480b5c3e83a22835bf58ac662beec02d263089
parent a2607957
......@@ -11,7 +11,7 @@ https://developers.google.com/open-source/licenses/bsd
# Install
```
$ cd ~/go/src
$ go get TODO/cups-connector
$ go get github.com/google/cups-connector
$ go get github.com/golang/oauth2
$ go get github.com/golang/glog
$ cd cups-connector/connector
......
......@@ -383,9 +383,9 @@ func stringToBool(val string) (bool, bool) {
func main() {
flag.Parse()
fmt.Println("Google Cloud Print CUPS Connector version", lib.GetBuildDate())
var parsed bool
var retainUserOAuthToken bool
if parsed, retainUserOAuthToken = stringToBool(*retainUserOAuthTokenFlag); !parsed {
retainUserOAuthToken = scanYesOrNo(
......
......@@ -23,7 +23,7 @@ var timeoutFlag = flag.Duration(
func main() {
flag.Parse()
fmt.Printf("CUPS Connector version %s\n", lib.GetBuildDate())
fmt.Println("Google Cloud Print CUPS Connector version", lib.GetBuildDate())
config, err := lib.ConfigFromFile()
if err != nil {
......
......@@ -30,6 +30,8 @@ var (
func main() {
flag.Parse()
fmt.Println("Google Cloud Print CUPS Connector version", lib.GetBuildDate())
if *deleteAllGCPPrintersFlag {
deleteAllGCPPrinters()
} else if *updateConfigFileFlag {
......
......@@ -26,8 +26,8 @@ import (
func main() {
flag.Parse()
defer glog.Flush()
glog.Errorf("CUPS Connector version %s", lib.GetBuildDate())
glog.Errorf("Google Cloud Print CUPS Connector version %s", lib.GetBuildDate())
fmt.Println("Google Cloud Print CUPS Connector version", lib.GetBuildDate())
config, err := lib.ConfigFromFile()
if err != nil {
......@@ -76,7 +76,6 @@ func main() {
if err := gcp.StartXMPP(); err != nil {
glog.Fatal(err)
}
glog.Info("Started XMPP successfully")
pm, err := manager.NewPrinterManager(cups, gcp, config.CUPSPrinterPollInterval,
config.GCPMaxConcurrentDownloads, config.CUPSJobQueueSize, config.CUPSJobFullUsername,
......@@ -92,12 +91,14 @@ func main() {
}
defer m.Quit()
fmt.Printf("Google Cloud Print CUPS Connector ready to rock as proxy '%s'\n", config.ProxyName)
glog.Errorf("Ready to rock as proxy '%s'\n", config.ProxyName)
fmt.Printf("Ready to rock as proxy '%s'\n", config.ProxyName)
waitIndefinitely()
glog.Error("Shutting down")
fmt.Println("")
fmt.Println("shutting down normally")
fmt.Println("Shutting down")
}
// Blocks until Ctrl-C or SIGTERM.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment