|
@@ -48,7 +48,8 @@ var (
|
48
|
48
|
|
49
|
49
|
// Logger is the main interface used to log debug/info/error messages.
|
50
|
50
|
type Logger struct {
|
51
|
|
- loggers []SingleLogger
|
|
51
|
+ loggers []SingleLogger
|
|
52
|
+ DumpingRawInOut bool
|
52
|
53
|
}
|
53
|
54
|
|
54
|
55
|
// NewLogger returns a new Logger.
|
|
@@ -66,6 +67,9 @@ func NewLogger(config []LoggingConfig) (*Logger, error) {
|
66
|
67
|
Types: logConfig.Types,
|
67
|
68
|
ExcludedTypes: logConfig.ExcludedTypes,
|
68
|
69
|
}
|
|
70
|
+ if logConfig.Types["userinput"] || logConfig.Types["useroutput"] || (logConfig.Types["*"] && !(logConfig.ExcludedTypes["userinput"] && logConfig.ExcludedTypes["useroutput"])) {
|
|
71
|
+ logger.DumpingRawInOut = true
|
|
72
|
+ }
|
69
|
73
|
if sLogger.MethodFile.Enabled {
|
70
|
74
|
file, err := os.OpenFile(sLogger.MethodFile.Filename, os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0666)
|
71
|
75
|
if err != nil {
|