新增日志模块

This commit is contained in:
zyj
2026-03-04 14:10:45 +08:00
parent 2cb4e1a87b
commit 7b01036f7c
5 changed files with 251 additions and 0 deletions

View File

@@ -4,9 +4,23 @@ import (
"os"
"github.com/user/devpack/cmd/devpack/commands"
"github.com/user/devpack/internal/logging"
)
func main() {
// 初始化日志
logOpts := logging.Options{
Level: "info",
LogFile: "devpack.log",
Verbose: false,
Quiet: false,
NoColor: false,
}
_, err := logging.Init(logOpts)
if err != nil {
os.Exit(1)
}
if err := commands.Execute(); err != nil {
os.Exit(1)
}