diff --git a/examples/logger/main.go b/examples/logger/main.go index 06ccd47..e2cab77 100644 --- a/examples/logger/main.go +++ b/examples/logger/main.go @@ -9,6 +9,7 @@ import ( // CustomLog is used in WithPublisherOptionsLogger to create a custom logger. type CustomLog struct{} +// Printf is the only method needed in the Logger interface to function properly. func (c *CustomLog) Printf(fmt string, args ...interface{}) { log.Printf("mylogger: "+fmt, args...) } diff --git a/publish.go b/publish.go index 29d4144..54c1e4c 100644 --- a/publish.go +++ b/publish.go @@ -101,7 +101,7 @@ func WithPublisherOptionsLogging(options *PublisherOptions) { options.Logger = &stdlog{} } -// WithPublisherOptionLogger sets logging to a custom interface. +// WithPublisherOptionsLogger sets logging to a custom interface. // Use WithPublisherOptionsLogging to just log to stdout. func WithPublisherOptionsLogger(log Logger) func(options *PublisherOptions) { return func(options *PublisherOptions) {