mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-01-20 16:50:28 -05:00
9a608a034d
Identical to console, file or conn but writes to a buffer instead. It is useful in two contexts: - tests that need to assert the logs in a way that is simpler than LogChecker. - capturing the logs of a given task to display in the web UI, return from the API, etc. Since all logged events at a given level are written to the buffer by default, it is best used with WriterMode.Expression to only keep the log lines of interest. ## Checklist The [contributor guide](https://forgejo.org/docs/next/contributor/) contains information that will be helpful to first time contributors. There also are a few [conditions for merging Pull Requests in Forgejo repositories](https://codeberg.org/forgejo/governance/src/branch/main/PullRequestsAgreement.md). You are also welcome to join the [Forgejo development chatroom](https://matrix.to/#/#forgejo-development:matrix.org). ### Tests - I added test coverage for Go changes... - [x] in their respective `*_test.go` for unit tests. - [ ] in the `tests/integration` directory if it involves interactions with a live Forgejo server. - I added test coverage for JavaScript changes... - [ ] in `web_src/js/*.test.js` if it can be unit tested. - [ ] in `tests/e2e/*.test.e2e.js` if it requires interactions with a live Forgejo server (see also the [developer guide for JavaScript testing](https://codeberg.org/forgejo/forgejo/src/branch/forgejo/tests/e2e/README.md#end-to-end-tests)). ### Documentation - [ ] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change. - [x] I did not document these changes and I do not expect someone else to do it. ### Release notes - [x] I do not want this change to show in the release notes. - [ ] I want the title to show in the release notes with a link to this pull request. - [ ] I want the content of the `release-notes/<pull request number>.md` to be be used for the release notes instead of the title. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6551 Reviewed-by: Antonin Delpeuch <wetneb@noreply.codeberg.org> Co-authored-by: Earl Warren <contact@earl-warren.org> Co-committed-by: Earl Warren <contact@earl-warren.org> |
||
---|---|---|
.. | ||
color.go | ||
color_console.go | ||
color_console_other.go | ||
color_console_windows.go | ||
color_router.go | ||
event_format.go | ||
event_format_test.go | ||
event_writer.go | ||
event_writer_base.go | ||
event_writer_buffer.go | ||
event_writer_buffer_test.go | ||
event_writer_conn.go | ||
event_writer_conn_test.go | ||
event_writer_console.go | ||
event_writer_file.go | ||
flags.go | ||
flags_test.go | ||
groutinelabel.go | ||
groutinelabel_go1.24.go | ||
groutinelabel_test.go | ||
init.go | ||
level.go | ||
level_test.go | ||
logger.go | ||
logger_global.go | ||
logger_impl.go | ||
logger_test.go | ||
manager.go | ||
manager_test.go | ||
misc.go | ||
stack.go |