log

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package log appends timestamped messages to hook log files with automatic rotation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Message

func Message(logFile, sessionID, msg string)

Message appends a timestamped log line to the given file. Rotates the log when it exceeds config.HookLogMaxBytes, keeping one previous generation (.1 suffix) - same pattern as eventlog.

Parameters:

  • logFile: Absolute path to the log file
  • sessionID: Session identifier (truncated to 8 chars)
  • msg: Log message to append

func RotateLog

func RotateLog(logFile string)

RotateLog checks the log file size and rotates if it exceeds config.HookLogMaxBytes. The previous generation is replaced.

Parameters:

  • logFile: Absolute path to the log file

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL