10 Commits

Author SHA1 Message Date
Alex Howells e56304b7f5 refactor(cmd): replace fmt.Printf with zerolog in supervisor (#1302)
The supervisor process in cmd/main.go used fmt.Printf for
operational messages (error dump handling, version mismatch
fatal), while the KVM application uses zerolog throughout.
The plain-text output mixed with zerolog-formatted output on
the same stdout stream, breaking log parsability for anyone
collecting logs via journald or similar.

Replace the five fmt.Printf calls in createErrorDump() and
the version mismatch fatal in main() with a supervisorLogger
using the existing logging.GetSubsystemLogger infrastructure.
Add "supervisor" to subsystemDefaultLevels at InfoLevel so the
"error dump saved" message is not suppressed by the default
ErrorLevel threshold.

Intentionally left unchanged:
- Version flag output (fmt.Println) — CLI output, not logging
- Crash info written to log file (fmt.Fprintf) — file I/O
- fmt.Sprintf calls — string formatting, not logging
- setProcTitle — process title, not logging

Signed-off-by: Alex Howells <alex@howells.me>
2026-03-17 09:35:59 +01:00
Adam Shiervani d84ff1b12a Enhance diagnostics logging with context-aware timeouts (#1138)
* Enhance diagnostics logging with context-aware timeouts

* Add full system diagnostics logging on supervisor crash

* Clear diagnostics context after logging to prevent memory leaks

* remove pr.txt
2026-01-07 15:25:53 +01:00
Adam Shiervani 4cf6b08964 Improve failsafe handling (#1135)
* Refactor crash log handling to improve large log handling.

- Introduced `readFileTail` function to read only the last specified bytes from log files, preventing memory issues with large files.
- Updated `checkFailsafeReason` and `rpcGetDiagnostics` functions to utilize `readFileTail` for reading crash logs and application logs, respectively.
- Adjusted log retrieval logic to handle different byte limits for recent and older crash logs.

* Remove the cause of the large logs. No need to log our mdn

* Move to HTTP for diagnostics

* Fix linter
2026-01-07 01:18:09 +01:00
Aveline 3fcd5e7def feat: move native to a separate process, again (#964) 2025-11-19 16:02:37 +01:00
Aveline 5fb4c629dd feat: failsafe mode (#952)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Adam Shiervani <adam.shiervani@gmail.com>
Co-authored-by: Marc Brooks <IDisposable@gmail.com>
2025-11-11 13:13:42 +01:00
Aveline c775979ccb feat: refactoring network stack (#878)
Co-authored-by: Adam Shiervani <adam.shiervani@gmail.com>
2025-10-15 18:32:58 +02:00
Aveline 657a177462 feat: jetkvm native in cGo 2025-09-29 14:09:30 +02:00
Aveline d704fcc6c7 feat: add command to show version (#604)
* feat: add -version flag for jetkvm_app

* move code to kvm package
2025-07-11 11:32:46 +02:00
SuperQ d3641bb4b9 Chore: Fix up various linting issues
In prep to add golangci-lint, fix various linting issues.
* Make the `kvm` package a fully-qualified public package.

Signed-off-by: SuperQ <superq@gmail.com>
2025-03-11 18:22:45 +01:00
Adam Shiervani 20780b65db Release 202412292127 2024-12-29 21:27:42 +01:00