You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
450 B
20 lines
450 B
3 weeks ago
|
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)
|
||
|
cmd.SysProcAttr = &syscall.SysProcAttr{HideWindow: false, CreationFlags: 0x08000000}
|
||
|
err := cmd.Start()
|
||
|
if err != nil {
|
||
|
slog.Error(fmt.Sprintf("Failed to open log dir: %s", err))
|
||
|
}
|
||
|
}
|