Skip to content

Commit

Permalink
chore: remove extra logging
Browse files Browse the repository at this point in the history
  • Loading branch information
kad-korpem committed Feb 19, 2025
1 parent c264cfb commit af70a6e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
5 changes: 0 additions & 5 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ package config
import (
"errors"
"fmt"
"log"
"os"

"github.com/creasty/defaults"
Expand Down Expand Up @@ -219,21 +218,17 @@ type License struct {

func setDefaults(config *Config) error {
// process 'default' tags
log.Println("Start setting defaults")
if err := defaults.Set(config); err != nil {
return fmt.Errorf("failed to set default configuration: %w", err)
}

// custom default logic
if len(config.AvailableLanguages) == 0 {
log.Println("Setting language defaults")
config.AvailableLanguages = append(config.AvailableLanguages, Language{language.Dutch}) // default to Dutch only
}
if config.OgcAPI.Tiles != nil {
log.Println("Setting tiles defaults")
config.OgcAPI.Tiles.Defaults()
}
log.Println("Done setting defaults")
return nil
}

Expand Down
3 changes: 0 additions & 3 deletions config/ogcapi_tiles.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package config

import (
"fmt"
"log"
"slices"
"sort"

Expand All @@ -23,10 +22,8 @@ type OgcAPITiles struct {
func (o *OgcAPITiles) Defaults() {
if o.DatasetTiles != nil && o.DatasetTiles.HealthCheck.Srs == DefaultSrs &&
o.DatasetTiles.HealthCheck.TilePath == nil {
log.Println("Setting dataset tiles healthcheck")
o.DatasetTiles.deriveHealthCheckTilePath()
} else if o.Collections != nil {
log.Println("Setting collection tiles healthcheck")
for _, coll := range o.Collections {
if coll.Tiles != nil && coll.Tiles.GeoDataTiles.HealthCheck.Srs == DefaultSrs && coll.Tiles.GeoDataTiles.HealthCheck.TilePath == nil {
coll.Tiles.GeoDataTiles.deriveHealthCheckTilePath()
Expand Down

0 comments on commit af70a6e

Please sign in to comment.