Simple Golang package for common logging requirements
- Go 100%
|
All checks were successful
ci/woodpecker/push/linting Pipeline was successful
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) | action | major | `v6` → `v7` | --- ### Release Notes <details> <summary>goreleaser/goreleaser-action (goreleaser/goreleaser-action)</summary> ### [`v7.2.2`](https://github.com/goreleaser/goreleaser-action/releases/tag/v7.2.2) [Compare Source](https://github.com/goreleaser/goreleaser-action/compare/v7.2.1...v7.2.2) #### What's Changed - ci(deps): bump the actions group with 3 updates by [@​dependabot](https://github.com/dependabot)\[bot] in [#​560](https://github.com/goreleaser/goreleaser-action/pull/560) - fix: nightly resolution to select newest published release by [@​Copilot](https://github.com/Copilot) in [#​562](https://github.com/goreleaser/goreleaser-action/pull/562) #### New Contributors - [@​Copilot](https://github.com/Copilot) made their first contribution in [#​562](https://github.com/goreleaser/goreleaser-action/pull/562) **Full Changelog**: <https://github.com/goreleaser/goreleaser-action/compare/v7...v7.2.2> ### [`v7.2.1`](https://github.com/goreleaser/goreleaser-action/releases/tag/v7.2.1) [Compare Source](https://github.com/goreleaser/goreleaser-action/compare/v7.2.0...v7.2.1) This fully removes the usage of the old `nightly` moving tag. **Full Changelog**: <https://github.com/goreleaser/goreleaser-action/compare/v7.2.0...v7.2.1> ### [`v7.2.0`](https://github.com/goreleaser/goreleaser-action/releases/tag/v7.2.0) [Compare Source](https://github.com/goreleaser/goreleaser-action/compare/v7.1.0...v7.2.0) #### What's Changed - test: cover install across release eras by [@​caarlos0](https://github.com/caarlos0) in [#​555](https://github.com/goreleaser/goreleaser-action/pull/555) - feat: add `version-file` input by [@​caarlos0](https://github.com/caarlos0) in [#​556](https://github.com/goreleaser/goreleaser-action/pull/556) - feat: resolve nightly to latest vX.Y.Z-<sha>-nightly release by [@​caarlos0](https://github.com/caarlos0) in [#​558](https://github.com/goreleaser/goreleaser-action/pull/558) **Full Changelog**: <https://github.com/goreleaser/goreleaser-action/compare/v7...v7.2.0> ### [`v7.1.0`](https://github.com/goreleaser/goreleaser-action/releases/tag/v7.1.0) [Compare Source](https://github.com/goreleaser/goreleaser-action/compare/v7...v7.1.0) #### What's Changed - feat: verify release checksum and cosign signature by [@​caarlos0](https://github.com/caarlos0) in [#​550](https://github.com/goreleaser/goreleaser-action/pull/550) - docs: document cosign verification in README by [@​caarlos0](https://github.com/caarlos0) in [#​553](https://github.com/goreleaser/goreleaser-action/pull/553) - docs: Upgrade import GPG action version by [@​flecno](https://github.com/flecno) in [#​547](https://github.com/goreleaser/goreleaser-action/pull/547) - ci: drop docker-bake in favor of plain npm by [@​caarlos0](https://github.com/caarlos0) in [#​551](https://github.com/goreleaser/goreleaser-action/pull/551) - ci: add release-major-tag workflow by [@​caarlos0](https://github.com/caarlos0) in [#​552](https://github.com/goreleaser/goreleaser-action/pull/552) - ci: drop pre-cosign-v3 goreleaser versions from tests by [@​caarlos0](https://github.com/caarlos0) in [#​554](https://github.com/goreleaser/goreleaser-action/pull/554) - ci(deps): bump the actions group with 2 updates by [@​dependabot](https://github.com/dependabot)\[bot] in [#​543](https://github.com/goreleaser/goreleaser-action/pull/543) - ci(deps): bump the actions group with 5 updates by [@​dependabot](https://github.com/dependabot)\[bot] in [#​546](https://github.com/goreleaser/goreleaser-action/pull/546) - chore(deps): bump undici from 6.23.0 to 6.24.1 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​545](https://github.com/goreleaser/goreleaser-action/pull/545) #### New Contributors - [@​flecno](https://github.com/flecno) made their first contribution in [#​547](https://github.com/goreleaser/goreleaser-action/pull/547) **Full Changelog**: <https://github.com/goreleaser/goreleaser-action/compare/v7...v7.1.0> ### [`v7.0.0`](https://github.com/goreleaser/goreleaser-action/releases/tag/v7.0.0) [Compare Source](https://github.com/goreleaser/goreleaser-action/compare/v7...v7) #### What's Changed - feat!: node 24, update deps, rm yarn, ESM by [@​caarlos0](https://github.com/caarlos0) in [#​533](https://github.com/goreleaser/goreleaser-action/pull/533) - sec: pin github action versions by [@​caarlos0](https://github.com/caarlos0) in [#​514](https://github.com/goreleaser/goreleaser-action/pull/514) - docs: Upgrade checkout GitHub Action in README.md by [@​dunglas](https://github.com/dunglas) in [#​507](https://github.com/goreleaser/goreleaser-action/pull/507) - chore(deps): bump actions/checkout from 4 to 5 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​504](https://github.com/goreleaser/goreleaser-action/pull/504) - ci(deps): bump the actions group with 2 updates by [@​dependabot](https://github.com/dependabot)\[bot] in [#​517](https://github.com/goreleaser/goreleaser-action/pull/517) - ci(deps): bump the actions group with 2 updates by [@​dependabot](https://github.com/dependabot)\[bot] in [#​523](https://github.com/goreleaser/goreleaser-action/pull/523) - ci(deps): bump docker/bake-action from 6.9.0 to 6.10.0 in the actions group by [@​dependabot](https://github.com/dependabot)\[bot] in [#​526](https://github.com/goreleaser/goreleaser-action/pull/526) - ci(deps): bump the actions group across 1 directory with 4 updates by [@​dependabot](https://github.com/dependabot)\[bot] in [#​532](https://github.com/goreleaser/goreleaser-action/pull/532) - ci(deps): bump actions/checkout from 6.0.1 to 6.0.2 in the actions group by [@​dependabot](https://github.com/dependabot)\[bot] in [#​534](https://github.com/goreleaser/goreleaser-action/pull/534) - chore(deps): bump the npm group across 1 directory with 4 updates by [@​dependabot](https://github.com/dependabot)\[bot] in [#​536](https://github.com/goreleaser/goreleaser-action/pull/536) - chore(deps): bump [@​actions/http-client](https://github.com/actions/http-client) from 3.0.2 to 4.0.0 in the npm group by [@​dependabot](https://github.com/dependabot)\[bot] in [#​537](https://github.com/goreleaser/goreleaser-action/pull/537) - ci(deps): bump docker/setup-buildx-action from 3.10.0 to 3.12.0 in the actions group by [@​dependabot](https://github.com/dependabot)\[bot] in [#​538](https://github.com/goreleaser/goreleaser-action/pull/538) - chore(deps): bump semver from 7.7.3 to 7.7.4 in the npm group by [@​dependabot](https://github.com/dependabot)\[bot] in [#​539](https://github.com/goreleaser/goreleaser-action/pull/539) **Full Changelog**: <https://github.com/goreleaser/goreleaser-action/compare/v6...v7.0.0> ### [`v7`](https://github.com/goreleaser/goreleaser-action/compare/v6.4.0...v7) [Compare Source](https://github.com/goreleaser/goreleaser-action/compare/v6.4.0...v7) </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xOTEuMiIsInVwZGF0ZWRJblZlciI6IjQzLjIwOS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> Reviewed-on: #3 |
||
|---|---|---|
| .github | ||
| .woodpecker | ||
| .editorconfig | ||
| .gitattributes | ||
| .gitignore | ||
| .goreleaser.yaml | ||
| debug.go | ||
| LICENSE | ||
| logging.go | ||
| prefix.go | ||
| readme.md | ||
| renovate.json | ||
Logger
This simple Golang package can be used for common logging functionality. Only when debug is on, non fatal errors will be shown.
Install
go get -u git.simoncor.net/golang/logger
Basic usage
logger.Print("Simple log message withouth error", nil)
logger.Fatal("Fatal log message with error and exits the program", err)
Will output like this:
2025/12/01 11:17:35 MyApp | LOG: Simple log message withouth error
2025/12/01 11:17:35 MyApp | FATAL: Fatal log message with error
2025/12/01 11:17:35 MyApp | ERROR: <insert value of err>
Options
logger.SetAppName("todo-app") # optional; default "MyApp"
logger.SetDebug(true) # optional; default false
Return functions
logger.GetAppName() # will return the current used app name as a string.
logger.GetDebug() # will return the current debug setting as a bool.