@@ -22,10 +22,10 @@ type LoggerOptions struct {
22
22
logFile string
23
23
}
24
24
25
- // Type for setter functions that specify LoggerOptions parameters
25
+ // LoggerOption is type for setter functions that specify LoggerOptions parameters
26
26
type LoggerOption func (* LoggerOptions )
27
27
28
- // Setter for LoggerOptions.logFile parameter
28
+ // LogFile is setter for LoggerOptions.logFile parameter
29
29
func LogFile (logFile string ) LoggerOption {
30
30
return func (args * LoggerOptions ) {
31
31
args .logFile = logFile
@@ -87,7 +87,7 @@ type Logger struct {
87
87
logFiles * LogFiles
88
88
}
89
89
90
- // Вefault value that disables the use of the log file
90
+ // NoLogFile is default value that disables the use of the log file
91
91
const NoLogFile string = ""
92
92
93
93
// New creates new logger.
@@ -193,14 +193,14 @@ func LevelFromString(s string) LogLevel {
193
193
}
194
194
}
195
195
196
- // Closes stdout and stderr if file pointers are not os.Stdout or os.Stderr
196
+ // Close closes stdout and stderr if file pointers are not os.Stdout or os.Stderr
197
197
func (files * LogFiles ) Close () {
198
198
if files .stdout != os .Stdout {
199
199
files .stdout .Close ()
200
200
}
201
201
}
202
202
203
- // Сhecks the path to the file is correct
203
+ // IsValidLogFile checks the path to the file is correct
204
204
func IsValidLogFile (logFile string ) error {
205
205
if logFile == NoLogFile {
206
206
return nil
@@ -215,7 +215,7 @@ func IsValidLogFile(logFile string) error {
215
215
return nil
216
216
}
217
217
218
- // Creates and/or opens a file for logging if the path to the file was specified.
218
+ // GetLogFiles creates and/or opens a file for logging if the path to the file was specified.
219
219
// Otherwise uses os.Stdout and os.Stderr for logging
220
220
func GetLogFiles (logFile string ) * LogFiles {
221
221
if logFile == NoLogFile {
0 commit comments