From 9f7e395c961f9842d671cc6b21b7760d17c2d8d0 Mon Sep 17 00:00:00 2001 From: Daniel Oaks Date: Fri, 6 Oct 2017 12:44:11 +1000 Subject: [PATCH] logger: Fix comments --- irc/logger/logger.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/irc/logger/logger.go b/irc/logger/logger.go index cebb5904..2e9f2f05 100644 --- a/irc/logger/logger.go +++ b/irc/logger/logger.go @@ -60,7 +60,7 @@ type Manager struct { loggingRawIO bool } -// Config represents the configuration of a single logger. +// LoggingConfig represents the configuration of a single logger. type LoggingConfig struct { Method string MethodStdout bool @@ -85,6 +85,7 @@ func NewManager(config []LoggingConfig) (*Manager, error) { return &logger, nil } +// ApplyConfig applies the given config to this logger (rehashes the config, in other words). func (logger *Manager) ApplyConfig(config []LoggingConfig) error { logger.configMutex.Lock() defer logger.configMutex.Unlock() @@ -140,6 +141,7 @@ func (logger *Manager) ApplyConfig(config []LoggingConfig) error { return lastErr } +// IsLoggingRawIO returns true if raw user input and output is being logged. func (logger *Manager) IsLoggingRawIO() bool { logger.configMutex.RLock() defer logger.configMutex.RUnlock()