forked from mcuadros/ofelia
-
Notifications
You must be signed in to change notification settings - Fork 0
Merge with upstream #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
b4bc13b
chore(deps): update golang docker tag to v1.26
github-actions[bot] eefa509
fix(deps): update module github.com/fsouza/go-dockerclient to v1.13.0
github-actions[bot] af72d0a
chore(deps): update alpine docker tag to v3.23.3
github-actions[bot] 29dc94d
chore(deps): update dependency go to v1.26.0
github-actions[bot] abc2eed
docs(README): document Docker host configuration
iamludal ebd2b12
fix(deps): update module github.com/go-viper/mapstructure/v2 to v2.5.0
github-actions[bot] 17d8036
fix(deps): update module github.com/magefile/mage to v1.16.1
github-actions[bot] 8266325
chore(deps): update dependency go to v1.26.1
github-actions[bot] 85184e6
revert `go-dockerclient` to 1.12.4
taraspos f6f22e9
refactor: replace go-logging with slog-backed logger
taraspos e454ef1
Update badge links in README.md
taraspos File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| FROM golang:1.25-alpine AS builder | ||
| FROM golang:1.26-alpine AS builder | ||
|
|
||
| RUN apk --no-cache add gcc musl-dev | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| package core | ||
|
|
||
| import ( | ||
| "io" | ||
| "log/slog" | ||
| "os" | ||
| "strconv" | ||
|
|
||
| "github.com/lmittmann/tint" | ||
| ) | ||
|
|
||
| type SlogLogger struct { | ||
| logger *slog.Logger | ||
| } | ||
|
|
||
| func NewSlogLogger(w io.Writer) Logger { | ||
| var logLevel slog.Level | ||
| l := os.Getenv("LOG_LEVEL") | ||
| if err := logLevel.UnmarshalText([]byte(l)); err != nil { | ||
| logLevel = slog.LevelInfo | ||
| } | ||
|
|
||
| return &SlogLogger{ | ||
| logger: slog.New(tint.NewHandler(w, &tint.Options{ | ||
| Level: logLevel, | ||
| AddSource: false, | ||
| NoColor: func() bool { | ||
| res, _ := strconv.ParseBool(os.Getenv("LOG_NO_COLOR")) | ||
| return res | ||
| }(), | ||
| })), | ||
| } | ||
|
|
||
| } | ||
|
|
||
| func (l *SlogLogger) Debug(str string, args ...any) { | ||
| l.logger.Debug(str, args...) | ||
| } | ||
|
|
||
| func (l *SlogLogger) Error(str string, args ...any) { | ||
| l.logger.Error(str, args...) | ||
| } | ||
|
|
||
| func (l *SlogLogger) Info(str string, args ...any) { | ||
| l.logger.Info(str, args...) | ||
| } | ||
|
|
||
| func (l *SlogLogger) Warning(str string, args ...any) { | ||
| l.logger.Warn(str, args...) | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.