2023-12-27 00:03:45 +00:00
|
|
|
package lifecycle
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"log/slog"
|
|
|
|
"os/exec"
|
|
|
|
"syscall"
|
|
|
|
)
|
|
|
|
|
|
|
|
func ShowLogs() {
|
|
|
|
cmd_path := "c:\\Windows\\system32\\cmd.exe"
|
|
|
|
slog.Debug(fmt.Sprintf("viewing logs with start %s", AppDataDir))
|
|
|
|
cmd := exec.Command(cmd_path, "/c", "start", AppDataDir)
|
2024-02-16 23:42:53 +00:00
|
|
|
cmd.SysProcAttr = &syscall.SysProcAttr{HideWindow: false, CreationFlags: 0x08000000}
|
2023-12-27 00:03:45 +00:00
|
|
|
err := cmd.Start()
|
|
|
|
if err != nil {
|
|
|
|
slog.Error(fmt.Sprintf("Failed to open log dir: %s", err))
|
|
|
|
}
|
|
|
|
}
|