Skip to content

Commit

Permalink
chore: new year, new copyright statements
Browse files Browse the repository at this point in the history
  • Loading branch information
monrax committed Jan 12, 2023
1 parent 4ce7e5c commit c2a5753
Show file tree
Hide file tree
Showing 15 changed files with 26 additions and 25 deletions.
2 changes: 1 addition & 1 deletion BaseLogger.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// © 2016-2022 Resurface Labs Inc.
// © 2016-2023 Resurface Labs Inc.

package logger

Expand Down
2 changes: 1 addition & 1 deletion BaseLogger_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// © 2016-2022 Resurface Labs Inc.
// © 2016-2023 Resurface Labs Inc.

package logger

Expand Down
20 changes: 10 additions & 10 deletions HttpClientLogger.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// © 2016-2022 Resurface Labs Inc.
// © 2016-2023 Resurface Labs Inc.

package logger

Expand All @@ -9,15 +9,15 @@ import (
"time"
)

//NetHttpClientLogger defines a struct used to log specifically from the client side of API interactions using the net/http package.
// NetHttpClientLogger defines a struct used to log specifically from the client side of API interactions using the net/http package.
type NetHttpClientLogger struct {
http.Client
HttpLogger *HttpLogger
}

//NewNetHttpClientLoggerOptions() takes 1 argument of type logger.Options and returns 2 objects; a pointer to an instance of an NetHttpClientLogger struct and an error.
//The NetHttpClientLogger returned by this function has the given options applied.
//If there is no error, the error value returned will be nil.
// NewNetHttpClientLoggerOptions() takes 1 argument of type logger.Options and returns 2 objects; a pointer to an instance of an NetHttpClientLogger struct and an error.
// The NetHttpClientLogger returned by this function has the given options applied.
// If there is no error, the error value returned will be nil.
func NewNetHttpClientLoggerOptions(options Options) (*NetHttpClientLogger, error) {
HttpLogger, err := NewHttpLogger(options)
if err != nil {
Expand All @@ -28,9 +28,9 @@ func NewNetHttpClientLoggerOptions(options Options) (*NetHttpClientLogger, error
}, nil
}

//NewNetHttpClientLogger() takes no arguments and returns 2 objects; a pointer to an instance of an NetHttpClientLogger struct and an error.
//The NetHttpClientLogger returned by this function has the default options applied.
//If there is no error, the error value returned will be nil.
// NewNetHttpClientLogger() takes no arguments and returns 2 objects; a pointer to an instance of an NetHttpClientLogger struct and an error.
// The NetHttpClientLogger returned by this function has the default options applied.
// If there is no error, the error value returned will be nil.
func NewNetHttpClientLogger() (*NetHttpClientLogger, error) {
options := Options{}
HttpLogger, err := NewHttpLogger(options)
Expand All @@ -46,12 +46,12 @@ func (logger *NetHttpClientLogger) Logger() *HttpLogger {
return logger.HttpLogger
}

//net.http.Client.CloseIdleConnections() wrapper
// net.http.Client.CloseIdleConnections() wrapper
func (clientLogger *NetHttpClientLogger) CloseIdleConnections() {
clientLogger.Client.CloseIdleConnections()
}

//net.http.Client.Do wrapper with logging
// net.http.Client.Do wrapper with logging
func (clientLogger *NetHttpClientLogger) Do(req *http.Request) (resp *http.Response, err error) {
// start time for logging interval
logger := clientLogger.HttpLogger
Expand Down
2 changes: 1 addition & 1 deletion HttpLogger.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// © 2016-2022 Resurface Labs Inc.
// © 2016-2023 Resurface Labs Inc.

// Resurface Go Logger provides tools to log API requests and responses from different Golang web frameworks to a complete API system of record. (https://resurface.io)
package logger
Expand Down
2 changes: 1 addition & 1 deletion HttpLoggerForMux.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// © 2016-2022 Resurface Labs Inc.
// © 2016-2023 Resurface Labs Inc.

package logger

Expand Down
2 changes: 1 addition & 1 deletion HttpLoggerRules_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// © 2016-2022 Resurface Labs Inc.
// © 2016-2023 Resurface Labs Inc.

package logger

Expand Down
2 changes: 1 addition & 1 deletion HttpLogger_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// © 2016-2022 Resurface Labs Inc.
// © 2016-2023 Resurface Labs Inc.

package logger

Expand Down
2 changes: 1 addition & 1 deletion HttpMessage.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// © 2016-2022 Resurface Labs Inc.
// © 2016-2023 Resurface Labs Inc.

package logger

Expand Down
2 changes: 1 addition & 1 deletion HttpRule.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// © 2016-2022 Resurface Labs Inc.
// © 2016-2023 Resurface Labs Inc.

package logger

Expand Down
5 changes: 3 additions & 2 deletions HttpRules.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// © 2016-2022 Resurface Labs Inc.
// © 2016-2023 Resurface Labs Inc.

package logger

Expand All @@ -17,6 +17,7 @@ var onceHttpRules sync.Once

/*
package global containing default:
debugRules
standardRules
strictRules
Expand Down Expand Up @@ -191,7 +192,7 @@ func (rules *HttpRules) DefaultRules() string {
return rules.defaultRules
}

//*HttpRules.SetDefaultRules(r string) sets the default rules of the logger to rule(s) r
// *HttpRules.SetDefaultRules(r string) sets the default rules of the logger to rule(s) r
func (rules *HttpRules) SetDefaultRules(r string) {
regex := regexp.MustCompile(`(?m)^\s*include default\s*$`)
rules.defaultRules = regex.ReplaceAllString(r, "")
Expand Down
2 changes: 1 addition & 1 deletion HttpRules_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// © 2016-2022 Resurface Labs Inc.
// © 2016-2023 Resurface Labs Inc.

package logger

Expand Down
2 changes: 1 addition & 1 deletion UsageLoggers.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// © 2016-2022 Resurface Labs Inc.
// © 2016-2023 Resurface Labs Inc.

package logger

Expand Down
2 changes: 1 addition & 1 deletion UsageLoggers_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// © 2016-2022 Resurface Labs Inc.
// © 2016-2023 Resurface Labs Inc.

package logger

Expand Down
2 changes: 1 addition & 1 deletion helper.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// © 2016-2022 Resurface Labs Inc.
// © 2016-2023 Resurface Labs Inc.

package logger

Expand Down
2 changes: 1 addition & 1 deletion helper_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// © 2016-2022 Resurface Labs Inc.
// © 2016-2023 Resurface Labs Inc.

package logger

Expand Down

0 comments on commit c2a5753

Please sign in to comment.