You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mask sensitive information from the logs (FF-2514) (#55)
* Mask sensitive information from the logs (FF-2514)
* feat: [add ability to users to provide a ApplicationLogger implementation in their preference library (zap, logrus, etc)] (FF-1940)
* Add generic application logger interface, zap implementation and documentation for adding custom implementation
* add masking to scrubbing logger
* fix readme
* instantiate once
* add test for masking url parameters in a different order
* fixup
* rename package to v5
* update readme
* required param
Copy file name to clipboardExpand all lines: README.md
+69-7Lines changed: 69 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,14 +22,14 @@ In your `go.mod`, add the SDK package as a dependency:
22
22
23
23
```
24
24
require (
25
-
github.com/Eppo-exp/golang-sdk/v4
25
+
github.com/Eppo-exp/golang-sdk/v5
26
26
)
27
27
```
28
28
29
29
Or you can install the SDK from the command line with:
30
30
31
31
```
32
-
go get github.com/Eppo-exp/golang-sdk/v4
32
+
go get github.com/Eppo-exp/golang-sdk/v5
33
33
```
34
34
35
35
## Quick start
@@ -40,7 +40,7 @@ Begin by initializing a singleton instance of Eppo's client. Once initialized, t
40
40
41
41
```go
42
42
import (
43
-
"github.com/Eppo-exp/golang-sdk/v4/eppoclient"
43
+
"github.com/Eppo-exp/golang-sdk/v5/eppoclient"
44
44
)
45
45
46
46
vareppoClient *eppoclient.EppoClient
@@ -62,7 +62,7 @@ func main() {
62
62
63
63
```go
64
64
import (
65
-
"github.com/Eppo-exp/golang-sdk/v4/eppoclient"
65
+
"github.com/Eppo-exp/golang-sdk/v5/eppoclient"
66
66
)
67
67
68
68
vareppoClient *eppoclient.EppoClient
@@ -107,7 +107,7 @@ The code below illustrates an example implementation of a logging callback using
107
107
108
108
```go
109
109
import (
110
-
"github.com/Eppo-exp/golang-sdk/v4/eppoclient"
110
+
"github.com/Eppo-exp/golang-sdk/v5/eppoclient"
111
111
"gopkg.in/segmentio/analytics-go.v3"
112
112
)
113
113
@@ -133,6 +133,68 @@ func main() {
133
133
}
134
134
```
135
135
136
+
## Provide a custom logger
137
+
138
+
If you want to provide a logging implementation to the SDK to capture errors and other application logs, you can do so by passing in an implementation of the `ApplicationLogger` interface to the `InitClient` function.
139
+
140
+
You can use the `eppoclient.ScrubbingLogger` to scrub PII from the logs.
0 commit comments