Skip to content

Commit

Permalink
Add newlines to log failures (#194)
Browse files Browse the repository at this point in the history
Multiple log failures currently get jumbled up into one big line.
  • Loading branch information
blampe authored Feb 15, 2024
1 parent 09ee181 commit 1759a7d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ type pkgContext struct {
func (p *pkgContext) Log(severity diag.Severity, msg string) {
err := p.provider.host.Log(p, severity, p.urn, msg)
if err != nil {
fmt.Fprintf(os.Stderr, "failed to log %s: %s", severity, msg)
fmt.Fprintf(os.Stderr, "failed to log %s: %s\n", severity, msg)
}
}

Expand All @@ -508,7 +508,7 @@ func (p *pkgContext) Logf(severity diag.Severity, msg string, args ...any) {
func (p *pkgContext) LogStatus(severity diag.Severity, msg string) {
err := p.provider.host.LogStatus(p, severity, p.urn, msg)
if err != nil {
fmt.Fprintf(os.Stderr, "failed to log %s status: %s", severity, msg)
fmt.Fprintf(os.Stderr, "failed to log %s status: %s\n", severity, msg)
}
}
func (p *pkgContext) LogStatusf(severity diag.Severity, msg string, args ...any) {
Expand Down

0 comments on commit 1759a7d

Please sign in to comment.