aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/hlog/hlog.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-09-29 06:21:04 +0900
committerOphestra <cat@gensokyo.uk>2025-09-29 06:21:04 +0900
commitdc467493d8a1461ea321ccf5ca3a2b037f880088 (patch)
tree59b98b8901f641409782020bc125a5d23f7f9cfd /internal/hlog/hlog.go
parent46cd3a28c83e93b5d66c52d06a8366c11910d5c0 (diff)
internal: remove hlog
This package has been fully replaced by container.Msg. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/hlog/hlog.go')
-rw-r--r--internal/hlog/hlog.go34
1 files changed, 0 insertions, 34 deletions
diff --git a/internal/hlog/hlog.go b/internal/hlog/hlog.go
deleted file mode 100644
index ff9b201e..00000000
--- a/internal/hlog/hlog.go
+++ /dev/null
@@ -1,34 +0,0 @@
-// Package hlog provides various functions for output messages.
-package hlog
-
-import (
- "log"
- "os"
-
- "hakurei.app/container"
-)
-
-var o = &container.Suspendable{Downstream: os.Stderr}
-
-// Prepare configures the system logger for [Suspend] and [Resume] to take effect.
-func Prepare(prefix string) { log.SetPrefix(prefix + ": "); log.SetFlags(0); log.SetOutput(o) }
-
-func Suspend() bool { return o.Suspend() }
-func Resume() bool {
- resumed, dropped, _, err := o.Resume()
- if err != nil {
- // probably going to result in an error as well,
- // so this call is as good as unreachable
- log.Printf("cannot dump buffer on resume: %v", err)
- }
- if resumed && dropped > 0 {
- log.Fatalf("dropped %d bytes while output is suspended", dropped)
- }
- return resumed
-}
-
-func BeforeExit() {
- if Resume() {
- log.Printf("beforeExit reached on suspended output")
- }
-}