Added logger and version (printed during Start()).
This commit is contained in:
parent
ad4c747aea
commit
6c7cf689aa
2 changed files with 5 additions and 0 deletions
|
|
@ -204,6 +204,8 @@ func (a *App) scripture() {
|
|||
}
|
||||
|
||||
func (a *App) Start(ctx context.Context, cmd *cli.Command) error {
|
||||
logger := logging.Logger()
|
||||
logger.Infof("Starting version %s", cmd.Root().Version)
|
||||
if err := a.loadEnv(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ type commands struct {
|
|||
meta *metadata
|
||||
verse *verse
|
||||
settings *settings.Settings
|
||||
logger *logging.Log
|
||||
version string
|
||||
}
|
||||
|
||||
func NewCommandHost(ctx context.Context, root vfs.VFS) (*commands, error) {
|
||||
|
|
@ -38,6 +40,7 @@ func NewCommandHost(ctx context.Context, root vfs.VFS) (*commands, error) {
|
|||
ctx: ctx,
|
||||
root: root,
|
||||
settings: conf,
|
||||
logger: logger,
|
||||
}
|
||||
cmd.meta = OpenMetadata(root, cmd)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue