forked from paketo-buildpacks/dotnet-core-runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlog_emitter.go
More file actions
32 lines (26 loc) · 779 Bytes
/
log_emitter.go
File metadata and controls
32 lines (26 loc) · 779 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package dotnetcoreruntime
import (
"io"
"time"
"github.com/paketo-buildpacks/packit"
"github.com/paketo-buildpacks/packit/postal"
"github.com/paketo-buildpacks/packit/scribe"
)
type LogEmitter struct {
// Emitter is embedded and therefore delegates all of its functions to the
// LogEmitter.
scribe.Emitter
}
func NewLogEmitter(output io.Writer) LogEmitter {
return LogEmitter{
Emitter: scribe.NewEmitter(output),
}
}
func (e LogEmitter) SelectedDependency(entry packit.BuildpackPlanEntry, dependency postal.Dependency, now time.Time) {
dependency.Name = dependency.ID
e.Emitter.SelectedDependency(entry, dependency, now)
}
func (l LogEmitter) Environment(env packit.Environment) {
l.Subprocess("%s", scribe.NewFormattedMapFromEnvironment(env))
l.Break()
}