diff options
| author | Mitch Riedstra <mitch@riedstra.us> | 2020-11-21 16:44:48 -0500 |
|---|---|---|
| committer | Mitch Riedstra <mitch@riedstra.us> | 2020-11-21 16:44:48 -0500 |
| commit | 3e1b39031437eaf48c5c6ea895dd632b1249b0a2 (patch) | |
| tree | 3b778d03d074b3798a4c53bbf19b1b0be389260d /cmd/web/install.go | |
| parent | 415c4a1a48502ae5180c48188c8f2e94d9c9d92c (diff) | |
| download | steam-export-3e1b39031437eaf48c5c6ea895dd632b1249b0a2.tar.gz steam-export-3e1b39031437eaf48c5c6ea895dd632b1249b0a2.tar.xz | |
Allow the library to be changed. Fix up quit handler. Improve logging
Diffstat (limited to 'cmd/web/install.go')
| -rw-r--r-- | cmd/web/install.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd/web/install.go b/cmd/web/install.go index cd2f03a..aae4191 100644 --- a/cmd/web/install.go +++ b/cmd/web/install.go @@ -28,6 +28,7 @@ var ( ) func installHttp(u string) error { + Logger.Println("Installer: loading from url") resp, err := http.Get(u) if err != nil { return fmt.Errorf("Installer: getting %w", err) @@ -42,6 +43,7 @@ func installHttp(u string) error { } func installPath(p string) error { + Logger.Println("Installer: loading from filesystem") fh, err := os.Open(p) if err != nil { return fmt.Errorf("Installer: opening %w", err) @@ -59,6 +61,7 @@ func installer(urls <-chan string) { var err error for u := range urls { status.m.Lock() + Logger.Printf("Installer: running for URI: %s", u) status.s.Running = true status.s.Url = u status.m.Unlock() @@ -72,6 +75,7 @@ func installer(urls <-chan string) { status.m.Lock() status.s.Running = false status.s.Error = err + Logger.Printf("Installer: Completed request %s Errors: %s", u, err) status.m.Unlock() reloadLib() @@ -110,6 +114,7 @@ func gameInstaller(w http.ResponseWriter, r *http.Request) { } } + Logger.Printf("Installer: Sending request for: %s to channel", uri) getPath <- uri http.Redirect(w, r, "/", 302) |
