Commit Graph
40 Commits
Author SHA1 Message Date
kolaenteandkolaente 6299bea794 fix(mail): guard log calls in GetMailDomain and fix hostname-dependent tests
GetMailDomain called log.Warningf which panics when the logger is not
initialized (e.g. in unit tests). Add log.IsInitialized() guard.

Also fix TestGetThreadID tests that hardcoded "vikunja" as the expected
fallback domain - on CI the os.Hostname() fallback produces a different
value. Tests now dynamically compute the expected domain.
2026-04-03 18:30:39 +00:00
kolaenteandGitHub 0e05d1cc9d fix(log): write each log category to its own file (#2206)
Previously, `makeLogHandler()` hardcoded "standard" as the logfile name
passed to `getLogWriter()`, causing all log categories (`database`,
`http`, `events`, `mail`) to write to `standard.log` instead of their
own files.

Add a logfile parameter to `makeLogHandler()` so each caller specifies
its category name, producing `database.log`, `http.log`, `echo.log`,
`events.log`, and `mail.log` as expected.

Fixes https://github.com/go-vikunja/vikunja/issues/2177
2026-02-08 15:22:58 +00:00
renovate[bot]GitHubrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>kolaente
9a61453e86 fix(deps): update module github.com/labstack/echo/v4 to v5 (#2131)
Closes https://github.com/go-vikunja/vikunja/pull/2133

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: kolaente <k@knt.li>
2026-01-24 20:38:32 +01:00
kolaenteandGitHub 6c7a800bf4 fix: set log path before creating log handler (#2064)
Resolves #2020
2026-01-08 13:53:08 +00:00
kolaente ca83ad1f98 feat: move to slog for logging 2025-07-21 18:15:39 +02:00
Dominik PschenitschniandGitHub 296577a875 fix: correct license header references (#882)
See originals:
- https://www.gnu.org/licenses/agpl-3.0.txt
- https://www.gnu.org/licenses/gpl-3.0.txt
2025-06-10 12:18:38 +02:00
kolaente 3509f1beb3 chore!: remove deprecated config settings 2025-03-24 16:52:46 +01:00
kolaente 83aeb90376 chore(logging): simplify log template string 2024-09-20 08:42:22 +02:00
kolaente f222ecfa19 chore(mail): update logger to new interface 2024-06-18 12:42:43 +00:00
kolaente 0d24ba12bb chore: rename function 2024-01-28 13:36:13 +01:00
ad04d302af chore: reverse the coupling of module log and config (#1606)
This way the config module can already use the log module with the same result (default logging to StdOut with Level INFO, same output as before) but ENV variables can already change the logging of config file related log output). It is now possible to dump as a cronjob without having to filter the default log about the used config file.

Also:
- all logging modules are now configurable when initializing which makes testing easier
- viper dependency removed from logging
- log correct settings when configured error level is invalid
- deprecation of value "false" for log.standard and log.events (already not mentioned in https://vikunja.io/docs/config-options/)

Co-authored-by: Berengar W. Lehr <Berengar.Lehr@uni-jena.de>
Reviewed-on: https://kolaente.dev/vikunja/api/pulls/1606
Reviewed-by: konrad <k@knt.li>
Co-authored-by: Peter H0ffmann <hoffmannp@noreply.kolaente.de>
Co-committed-by: Peter H0ffmann <hoffmannp@noreply.kolaente.de>
2023-10-03 09:28:28 +00:00
kolaente e518fb1191 chore: remove year from copyright headers
Resolves https://kolaente.dev/vikunja/api/pulls/1483
2023-09-01 08:32:28 +02:00
kolaente f4e12dab27 fix: add missing license header 2023-03-25 12:28:56 +00:00
kolaente f0dcce702f fix: lint 2023-03-25 12:28:56 +00:00
kolaente 9590b82c11 feat: add logging options to mailer settings 2023-03-25 12:28:56 +00:00
kolaente 4d5ad8f50e chore(deps): update golangci-lint to 1.52.1 2023-03-24 19:17:45 +01:00
kolaente 22e3f242a3 fix: disabling logging completely now works 2022-02-19 17:42:32 +01:00
kolaente 6de3d8b3a1 Explicitly check if there are Ids before trying to get items by a list of Ids 2021-03-02 18:40:39 +01:00
konradandkolaente 0ab9ce9ec4 Add events (#777)
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/api/pulls/777
Co-authored-by: konrad <konrad@kola-entertainments.de>
Co-committed-by: konrad <konrad@kola-entertainments.de>
2021-02-02 22:48:37 +00:00
kolaente c4a71016b8 Update copyright year 2021-02-02 20:19:13 +01:00
kolaente 9baf6d39bd Change license to AGPLv3 2020-12-23 16:41:52 +01:00
konradandkolaente 699d3d6060 Add Golangci Lint (#676)
Increase golangci timeout

Fix installing golangci-lint in ci

Remove mage targets replaced by golangci

Run golint in ci

Add goheader linter

Enable & fix more linters

Fix lint issues

Add mage target to automagically fix issues found by golangci

golangci-lint run --fix

Add golangci config

Add golangci mage target

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/api/pulls/676
Co-Authored-By: konrad <konrad@kola-entertainments.de>
Co-Committed-By: konrad <konrad@kola-entertainments.de>
2020-10-11 20:10:03 +00:00
konradandkolaente ecdecdd94e Kanban (#393)
Fix tests

Add error docs

Add swagger docs for bucket endpoints

Add integration tests

Fix tests

Fix err shadow

Make sure a bucket and a task belong to the same list when adding or updating a task

Add tests

Add getting users of a bucket

Fix log level when testing

Fix lint

Add migration for buckets

Cleanup/Comments/Reorganization

Add Kanban bucket handling

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/api/pulls/393
2020-04-19 07:27:28 +00:00
kolaente 81990f3f80 Update xorm redis cacher to use the xorm logger instead of a special seperate one 2020-04-13 23:18:33 +02:00
kolaente b8d7c97eb7 Add gosec static analysis 2020-04-13 22:30:09 +02:00
kolaente 0bfb3a4709 Add configuration options for log level 2020-04-12 22:32:21 +02:00
konradandkolaente d28f005552 Update xorm to v1 (#323)
Fix limit for databases other than sqlite

go mod tidy && go mod vendor

Remove unneeded break statements

Make everything work with the new xorm version

Fix xorm logging

Fix lint

Fix redis init

Fix using id field

Fix database init for testing

Change default database log level

Add xorm logger

Use const for postgres

go mod tidy

Merge branch 'master' into update/xorm

# Conflicts:
#	go.mod
#	go.sum
#	vendor/modules.txt

go mod vendor

Fix loading fixtures for postgres

Go mod vendor1

Update xorm to version 1

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/api/pulls/323
2020-04-12 17:29:24 +00:00
kolaente 1f99238019 Update copyright header 2020-02-07 17:27:45 +01:00
konrad a0c5e4e985 Update copyright year (#118) 2020-01-09 17:33:22 +00:00
shilchandkonrad e890001ee1 Consistent copyright text in file headers (#112) 2019-12-04 19:39:56 +00:00
kolaente 43676f045c Switched default logger to stdout instead of stderr 2019-09-01 18:23:35 +02:00
kolaente ba7db545fe Added extra depth to logging to correctly show the functions calling the logger in logs 2019-09-01 17:56:22 +02:00
konradandGitea 4327a559e5 feature/rate-limit (#91) 2019-07-21 21:27:30 +00:00
konradandGitea 48826a6ed7 Logger refactoring (#90) 2019-07-20 18:12:10 +00:00
konradandGitea 1f1a079fd3 Better config handling with constants (#83) 2019-07-06 20:12:26 +00:00
konradandGitea 1b84292332 Fix lint errs (#59) 2019-02-18 19:32:41 +00:00
konrad 5e7c9b9eb9 Added possible fix for logging when nothing is set 2019-01-25 21:09:24 +01:00
konradandGitea 9e635ea54e Improve logging handling (#57) 2019-01-25 11:40:54 +00:00
konradandGitea 3f44e3b83e Change License to GPLv3 (#26) 2018-11-26 20:17:33 +00:00
konradandGitea 301a4eedda New structure (#7) 2018-10-31 12:42:38 +00:00