Skip to content

Commit

Permalink
Fix logging issue when failure to load spec source (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
jwillp authored Sep 4, 2024
1 parent 2e8328d commit 875af13
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 1 deletion.
14 changes: 14 additions & 0 deletions pkg/specter/common.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// Copyright 2024 Morébec
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package specter

type ArtifactID string
Expand Down
2 changes: 1 addition & 1 deletion pkg/specter/pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ func (p Pipeline) loadSpecifications(ctx context.Context, sources []Source) ([]S

if len(sourcesNotLoaded) > 0 {
for _, src := range sourcesNotLoaded {
p.Logger.Warning(fmt.Sprintf("%q could not be loaded.", src))
p.Logger.Warning(fmt.Sprintf("%q could not be loaded.", src.Location))
}

p.Logger.Warning("%d specifications were not loaded.")
Expand Down
14 changes: 14 additions & 0 deletions pkg/specter/specter_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// Copyright 2024 Morébec
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package specter_test

import (
Expand Down
14 changes: 14 additions & 0 deletions pkg/specterutils/genericspec.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// Copyright 2024 Morébec
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package specterutils

import (
Expand Down
14 changes: 14 additions & 0 deletions pkg/specterutils/specterutils_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// Copyright 2024 Morébec
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package specterutils

import (
Expand Down

0 comments on commit 875af13

Please sign in to comment.