Skip to content

Commit 0e79f38

Browse files
committed
Improved comment on LogEvents
1 parent 27cf990 commit 0e79f38

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

output/logger.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func (l *Output) shouldLogDotfile(dotfile *installer.PreparedDotfile) bool {
5757
}
5858

5959
func (l *Output) logEvent(event events.Event) {
60-
// Do something here
60+
// TODO: Do something here
6161
}
6262

6363
// GetEventChan returns the event channel that may be sent events to be
@@ -66,7 +66,14 @@ func (l *Output) GetEventChan() chan<- events.Event {
6666
return l.eventChan
6767
}
6868

69-
// LogEvents procese
69+
// LogEvents processes the Events channel and output logging for each event
70+
// processed on the channel. A function is returned that when called will stop
71+
// processing.
72+
//
73+
// Typically this should be called with a defer, e.g:
74+
//
75+
// defer myLogger.LogEvents()()
76+
//
7077
func (l *Output) LogEvents() func() {
7178
stop := make(chan bool)
7279

0 commit comments

Comments
 (0)