@@ -58,32 +58,6 @@ type (
58
58
}
59
59
)
60
60
61
- // DefaultLogMessageFormat is the default log message format
62
- var DefaultLogMessageFormat = LogMessageFormat {
63
- StatusSeparator : gologgerstrings .NewRepeatedContentSeparator (gologgerstrings .SpaceSeparator ),
64
- DetailsSeparator : gologgerstrings .NewMultilineSeparator (
65
- gologgerstrings .SpaceSeparator ,
66
- gologgerstrings .NewLineSeparator ,
67
- 1 ,
68
- ),
69
- }
70
-
71
- // DefaultLogErrorFormat is the default log error format
72
- var DefaultLogErrorFormat = LogErrorFormat {
73
- StatusSeparator : gologgerstrings .NewRepeatedContentSeparator (gologgerstrings .SpaceSeparator ),
74
- ErrorsSeparator : gologgerstrings .NewMultilineSeparator (
75
- gologgerstrings .SpaceSeparator ,
76
- gologgerstrings .NewLineSeparator ,
77
- 1 ,
78
- ),
79
- }
80
-
81
- // DefaultLoggerFormat is the default logger format
82
- var DefaultLoggerFormat = LoggerFormat {
83
- NameSeparator : gologgerstrings .NewRepeatedContentSeparator (gologgerstrings .SpaceSeparator ),
84
- MessageSeparator : gologgerstrings .SpaceSeparator ,
85
- }
86
-
87
61
// NewLogMessageFormat creates a new log message format
88
62
func NewLogMessageFormat (
89
63
statusSeparator * gologgerstrings.ContentSeparator ,
@@ -103,6 +77,16 @@ func CopyLogMessageFormat(format *LogMessageFormat) *LogMessageFormat {
103
77
}
104
78
}
105
79
80
+ // DefaultLogMessageFormat is the default log message format
81
+ var DefaultLogMessageFormat = NewLogMessageFormat (
82
+ gologgerstrings .NewRepeatedContentSeparator (gologgerstrings .SpaceSeparator ),
83
+ gologgerstrings .NewMultilineSeparator (
84
+ gologgerstrings .SpaceSeparator ,
85
+ gologgerstrings .NewLineSeparator ,
86
+ 1 ,
87
+ ),
88
+ )
89
+
106
90
// NewLogErrorFormat creates a new log error format
107
91
func NewLogErrorFormat (
108
92
statusSeparator * gologgerstrings.ContentSeparator ,
@@ -122,6 +106,16 @@ func CopyLogErrorFormat(format *LogErrorFormat) *LogErrorFormat {
122
106
}
123
107
}
124
108
109
+ // DefaultLogErrorFormat is the default log error format
110
+ var DefaultLogErrorFormat = NewLogErrorFormat (
111
+ gologgerstrings .NewRepeatedContentSeparator (gologgerstrings .SpaceSeparator ),
112
+ gologgerstrings .NewMultilineSeparator (
113
+ gologgerstrings .SpaceSeparator ,
114
+ gologgerstrings .NewLineSeparator ,
115
+ 1 ,
116
+ ),
117
+ )
118
+
125
119
// NewLoggerFormat creates a new logger format
126
120
func NewLoggerFormat (
127
121
nameSeparator * gologgerstrings.ContentSeparator ,
@@ -141,6 +135,12 @@ func CopyLoggerFormat(format *LoggerFormat) *LoggerFormat {
141
135
}
142
136
}
143
137
138
+ // DefaultLoggerFormat is the default logger format
139
+ var DefaultLoggerFormat = NewLoggerFormat (
140
+ gologgerstrings .NewRepeatedContentSeparator (gologgerstrings .SpaceSeparator ),
141
+ gologgerstrings .SpaceSeparator ,
142
+ )
143
+
144
144
// NewLogMessage creates a new log message
145
145
func NewLogMessage (
146
146
title string ,
@@ -150,7 +150,7 @@ func NewLogMessage(
150
150
) * LogMessage {
151
151
// Check if the format is nil
152
152
if format == nil {
153
- format = & DefaultLogMessageFormat
153
+ format = DefaultLogMessageFormat
154
154
}
155
155
156
156
return & LogMessage {
@@ -202,7 +202,7 @@ func NewLogError(
202
202
) * LogError {
203
203
// Check if the format is nil
204
204
if format == nil {
205
- format = & DefaultLogErrorFormat
205
+ format = DefaultLogErrorFormat
206
206
}
207
207
208
208
return & LogError {
@@ -247,7 +247,7 @@ func (l *LogError) String() string {
247
247
func NewDefaultLogger (name string , format * LoggerFormat ) * DefaultLogger {
248
248
// Check if the format is nil
249
249
if format == nil {
250
- format = & DefaultLoggerFormat
250
+ format = DefaultLoggerFormat
251
251
}
252
252
253
253
return & DefaultLogger {
0 commit comments