Skip to content

Commit

Permalink
Improved logging, updated dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kugelschieber committed Apr 15, 2024
1 parent 14bf2cd commit ccf19bf
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 1.6.1

* improved logging
* updated dependencies

## 1.6.0

* refactored project
Expand Down
4 changes: 4 additions & 0 deletions demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,9 @@
<img src="http://localhost:8080/?size=32&url=https://this-should-not-exist&fallback=default-white.svg" />
<p>Fallback (white)</p>
</div>
<div>
<img src="http://localhost:8080/?url=&size=16&fallback=fallback-white.svg" />
<p>Broken Fallback</p>
</div>
</body>
</html>
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ require (
github.com/emvi/logbuch v1.2.0
github.com/go-chi/chi v1.5.5
github.com/go-chi/cors v1.2.1
golang.org/x/net v0.22.0
golang.org/x/net v0.24.0
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ github.com/go-chi/chi v1.5.5 h1:vOB/HbEMt9QqBqErz07QehcOKHaWFtuj87tTDVz2qXE=
github.com/go-chi/chi v1.5.5/go.mod h1:C9JqLr3tIYjDOZpzn+BCuxY8z8vmca43EeMgyZt7irw=
github.com/go-chi/cors v1.2.1 h1:xEC8UT3Rlp2QuWNEr4Fs/c2EAGVKBwy/1vHx3bppil4=
github.com/go-chi/cors v1.2.1/go.mod h1:sSbTewc+6wYHBBCW7ytsFSn836hqM7JxpglAy2Vzc58=
golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc=
golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w=
golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8=
4 changes: 2 additions & 2 deletions pkg/favicon/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ func setResponseHeaders(w http.ResponseWriter, etag string) {

func serveDefaultFavicon(w http.ResponseWriter, r *http.Request, fallback string) {
if fallback == "" {
logbuch.Info("Serving fallback icon", logbuch.Fields{"path": filepath.Join(server.Config().Cache.DefaultFaviconDir, server.Config().Cache.DefaultFavicon)})
logbuch.Debug("Serving fallback icon", logbuch.Fields{"path": filepath.Join(server.Config().Cache.DefaultFaviconDir, server.Config().Cache.DefaultFavicon)})
http.ServeFile(w, r, filepath.Join(server.Config().Cache.DefaultFaviconDir, server.Config().Cache.DefaultFavicon))
} else {
logbuch.Info("Serving fallback icon", logbuch.Fields{"path": filepath.Join(server.Config().Cache.DefaultFaviconDir, filepath.Base(fallback))})
logbuch.Debug("Serving fallback icon", logbuch.Fields{"path": filepath.Join(server.Config().Cache.DefaultFaviconDir, filepath.Base(fallback))})
http.ServeFile(w, r, filepath.Join(server.Config().Cache.DefaultFaviconDir, filepath.Base(fallback)))
}
}
2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ github.com/go-chi/chi
# github.com/go-chi/cors v1.2.1
## explicit; go 1.14
github.com/go-chi/cors
# golang.org/x/net v0.22.0
# golang.org/x/net v0.24.0
## explicit; go 1.18
golang.org/x/net/html
golang.org/x/net/html/atom

0 comments on commit ccf19bf

Please sign in to comment.