Skip to content

Commit

Permalink
Merge pull request #115 from marco-m/fix-typos
Browse files Browse the repository at this point in the history
fix various typos in comments
  • Loading branch information
evanphx committed Jul 25, 2022
2 parents fb7b65b + 664598b commit 2c83f91
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion colorize_unix.go
Expand Up @@ -8,7 +8,7 @@ import (
)

// setColorization will mutate the values of this logger
// to approperately configure colorization options. It provides
// to appropriately configure colorization options. It provides
// a wrapper to the output stream on Windows systems.
func (l *intLogger) setColorization(opts *LoggerOptions) {
switch opts.Color {
Expand Down
2 changes: 1 addition & 1 deletion colorize_windows.go
Expand Up @@ -11,7 +11,7 @@ import (
)

// setColorization will mutate the values of this logger
// to approperately configure colorization options. It provides
// to appropriately configure colorization options. It provides
// a wrapper to the output stream on Windows systems.
func (l *intLogger) setColorization(opts *LoggerOptions) {
switch opts.Color {
Expand Down
4 changes: 2 additions & 2 deletions global.go
Expand Up @@ -20,13 +20,13 @@ var (
)

// Default returns a globally held logger. This can be a good starting
// place, and then you can use .With() and .Name() to create sub-loggers
// place, and then you can use .With() and .Named() to create sub-loggers
// to be used in more specific contexts.
// The value of the Default logger can be set via SetDefault() or by
// changing the options in DefaultOptions.
//
// This method is goroutine safe, returning a global from memory, but
// cause should be used if SetDefault() is called it random times
// care should be used if SetDefault() is called it random times
// in the program as that may result in race conditions and an unexpected
// Logger being returned.
func Default() Logger {
Expand Down
2 changes: 1 addition & 1 deletion intlogger.go
Expand Up @@ -160,7 +160,7 @@ func newLogger(opts *LoggerOptions) *intLogger {
}

// offsetIntLogger is the stack frame offset in the call stack for the caller to
// one of the Warn,Info,Log,etc methods.
// one of the Warn, Info, Log, etc methods.
const offsetIntLogger = 3

// Log a message and a set of key/value pairs if the given level is at
Expand Down
18 changes: 9 additions & 9 deletions logger.go
Expand Up @@ -9,7 +9,7 @@ import (
)

var (
//DefaultOutput is used as the default log output.
// DefaultOutput is used as the default log output.
DefaultOutput io.Writer = os.Stderr

// DefaultLevel is used as the default log level.
Expand All @@ -28,7 +28,7 @@ const (
// of actions in code, such as function enters/exits, etc.
Trace Level = 1

// Debug information for programmer lowlevel analysis.
// Debug information for programmer low-level analysis.
Debug Level = 2

// Info information about steady state operations.
Expand All @@ -44,13 +44,13 @@ const (
Off Level = 6
)

// Format is a simple convience type for when formatting is required. When
// Format is a simple convenience type for when formatting is required. When
// processing a value of this type, the logger automatically treats the first
// argument as a Printf formatting string and passes the rest as the values
// to be formatted. For example: L.Info(Fmt{"%d beans/day", beans}).
type Format []interface{}

// Fmt returns a Format type. This is a convience function for creating a Format
// Fmt returns a Format type. This is a convenience function for creating a Format
// type.
func Fmt(str string, args ...interface{}) Format {
return append(Format{str}, args...)
Expand Down Expand Up @@ -134,7 +134,7 @@ func (l Level) String() string {
}
}

// Logger describes the interface that must be implemeted by all loggers.
// Logger describes the interface that must be implemented by all loggers.
type Logger interface {
// Args are alternating key, val pairs
// keys must be strings
Expand Down Expand Up @@ -236,7 +236,7 @@ type LoggerOptions struct {
// Name of the subsystem to prefix logs with
Name string

// The threshold for the logger. Anything less severe is supressed
// The threshold for the logger. Anything less severe is suppressed
Level Level

// Where to write the logs to. Defaults to os.Stderr if nil
Expand Down Expand Up @@ -267,7 +267,7 @@ type LoggerOptions struct {
// because setting TimeFormat to empty assumes the default format.
DisableTime bool

// Color the output. On Windows, colored logs are only avaiable for io.Writers that
// Color the output. On Windows, colored logs are only available for io.Writers that
// are concretely instances of *os.File.
Color ColorOption

Expand All @@ -282,8 +282,8 @@ type LoggerOptions struct {

// IndependentLevels causes subloggers to be created with an independent
// copy of this logger's level. This means that using SetLevel on this
// logger will not effect any subloggers, and SetLevel on any subloggers
// will not effect the parent or sibling loggers.
// logger will not affect any subloggers, and SetLevel on any subloggers
// will not affect the parent or sibling loggers.
IndependentLevels bool
}

Expand Down

0 comments on commit 2c83f91

Please sign in to comment.