新增日志模块
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user