Simple Golang package for common logging requirements
Find a file
Renovate Bot b0398254af
All checks were successful
ci/woodpecker/push/linting Pipeline was successful
chore(package): update goreleaser/goreleaser-action action to v7 (#3)
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 [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;560](https://github.com/goreleaser/goreleaser-action/pull/560)
- fix: nightly resolution to select newest published release by [@&#8203;Copilot](https://github.com/Copilot) in [#&#8203;562](https://github.com/goreleaser/goreleaser-action/pull/562)

#### New Contributors

- [@&#8203;Copilot](https://github.com/Copilot) made their first contribution in [#&#8203;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 [@&#8203;caarlos0](https://github.com/caarlos0) in [#&#8203;555](https://github.com/goreleaser/goreleaser-action/pull/555)
- feat: add `version-file` input by [@&#8203;caarlos0](https://github.com/caarlos0) in [#&#8203;556](https://github.com/goreleaser/goreleaser-action/pull/556)
- feat: resolve nightly to latest vX.Y.Z-<sha>-nightly release by [@&#8203;caarlos0](https://github.com/caarlos0) in [#&#8203;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 [@&#8203;caarlos0](https://github.com/caarlos0) in [#&#8203;550](https://github.com/goreleaser/goreleaser-action/pull/550)
- docs: document cosign verification in README by [@&#8203;caarlos0](https://github.com/caarlos0) in [#&#8203;553](https://github.com/goreleaser/goreleaser-action/pull/553)
- docs: Upgrade import GPG action version by [@&#8203;flecno](https://github.com/flecno) in [#&#8203;547](https://github.com/goreleaser/goreleaser-action/pull/547)
- ci: drop docker-bake in favor of plain npm by [@&#8203;caarlos0](https://github.com/caarlos0) in [#&#8203;551](https://github.com/goreleaser/goreleaser-action/pull/551)
- ci: add release-major-tag workflow by [@&#8203;caarlos0](https://github.com/caarlos0) in [#&#8203;552](https://github.com/goreleaser/goreleaser-action/pull/552)
- ci: drop pre-cosign-v3 goreleaser versions from tests by [@&#8203;caarlos0](https://github.com/caarlos0) in [#&#8203;554](https://github.com/goreleaser/goreleaser-action/pull/554)
- ci(deps): bump the actions group with 2 updates by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;543](https://github.com/goreleaser/goreleaser-action/pull/543)
- ci(deps): bump the actions group with 5 updates by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;546](https://github.com/goreleaser/goreleaser-action/pull/546)
- chore(deps): bump undici from 6.23.0 to 6.24.1 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;545](https://github.com/goreleaser/goreleaser-action/pull/545)

#### New Contributors

- [@&#8203;flecno](https://github.com/flecno) made their first contribution in [#&#8203;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 [@&#8203;caarlos0](https://github.com/caarlos0) in [#&#8203;533](https://github.com/goreleaser/goreleaser-action/pull/533)
- sec: pin github action versions by [@&#8203;caarlos0](https://github.com/caarlos0) in [#&#8203;514](https://github.com/goreleaser/goreleaser-action/pull/514)
- docs: Upgrade checkout GitHub Action in README.md by [@&#8203;dunglas](https://github.com/dunglas) in [#&#8203;507](https://github.com/goreleaser/goreleaser-action/pull/507)
- chore(deps): bump actions/checkout from 4 to 5 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;504](https://github.com/goreleaser/goreleaser-action/pull/504)
- ci(deps): bump the actions group with 2 updates by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;517](https://github.com/goreleaser/goreleaser-action/pull/517)
- ci(deps): bump the actions group with 2 updates by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;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 [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;526](https://github.com/goreleaser/goreleaser-action/pull/526)
- ci(deps): bump the actions group across 1 directory with 4 updates by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;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 [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;534](https://github.com/goreleaser/goreleaser-action/pull/534)
- chore(deps): bump the npm group across 1 directory with 4 updates by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;536](https://github.com/goreleaser/goreleaser-action/pull/536)
- chore(deps): bump [@&#8203;actions/http-client](https://github.com/actions/http-client) from 3.0.2 to 4.0.0 in the npm group by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;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 [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;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 [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;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
2026-06-05 08:31:36 +02:00
.github chore(package): update goreleaser/goreleaser-action action to v7 (#3) 2026-06-05 08:31:36 +02:00
.woodpecker ci: add gitleaks woodpecker pipeline 2026-05-15 19:24:26 +02:00
.editorconfig chore: add .editorconfig and .gitattributes 2026-05-27 14:24:22 +02:00
.gitattributes chore: add .editorconfig and .gitattributes 2026-05-27 14:24:22 +02:00
.gitignore feat: initial commit 2025-03-06 11:26:17 +01:00
.goreleaser.yaml ci(release): add release name 2025-04-04 11:41:34 +02:00
debug.go feat: rename package to logger 2025-03-06 11:58:51 +01:00
LICENSE feat: initial commit 2025-03-06 11:25:38 +01:00
logging.go feat: rename package to logger 2025-03-06 11:58:51 +01:00
prefix.go feat: rename package to logger 2025-03-06 11:58:51 +01:00
readme.md chore: migrate repository to forgejo 2026-05-15 18:11:24 +02:00
renovate.json feat: initial commit 2025-03-06 11:25:38 +01:00

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.