Skip to content

Commit

Permalink
set logging in repo setup
Browse files Browse the repository at this point in the history
  • Loading branch information
wdbaruni committed Oct 7, 2024
1 parent 31fe782 commit 01e8e79
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/setup/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (

"github.com/bacalhau-project/bacalhau/pkg/config"
"github.com/bacalhau-project/bacalhau/pkg/config/types"
"github.com/bacalhau-project/bacalhau/pkg/logger"
"github.com/bacalhau-project/bacalhau/pkg/repo/migrations"

"github.com/bacalhau-project/bacalhau/pkg/repo"
Expand All @@ -24,6 +25,9 @@ func SetupMigrationManager() (*repo.MigrationManager, error) {

// SetupBacalhauRepo ensures that a bacalhau repo and config exist and are initialized.
func SetupBacalhauRepo(cfg types.Bacalhau) (*repo.FsRepo, error) {
if err := logger.ParseAndConfigureLogging(cfg.Logging.Mode, cfg.Logging.Level); err != nil {
return nil, fmt.Errorf("failed to configure logging: %w", err)
}
migrationManger, err := SetupMigrationManager()
if err != nil {
return nil, fmt.Errorf("failed to create migration manager: %w", err)
Expand Down

0 comments on commit 01e8e79

Please sign in to comment.