Skip to content

Commit 21ef5c2

Browse files
committed
Rename the Entry() function to LogEntry() so it doesn't conflict with ginkgo's Entry() function, and both modules can be imported to the local namespace
1 parent a37b09d commit 21ef5c2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

glager.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,13 @@ func ContainSequence(expectedSequence ...logEntry) types.GomegaMatcher {
127127
// Info returns a log entry of type lager.INFO that can be used with the
128128
// HaveLogged and ContainSequence matchers.
129129
func Info(options ...option) logEntry {
130-
return Entry(lager.INFO, options...)
130+
return LogEntry(lager.INFO, options...)
131131
}
132132

133133
// Debug returns a log entry of type lager.DEBUG that can be used with the
134134
// HaveLogged and ContainSequence matchers.
135135
func Debug(options ...option) logEntry {
136-
return Entry(lager.DEBUG, options...)
136+
return LogEntry(lager.DEBUG, options...)
137137
}
138138

139139
// AnyErr can be used to check of arbitrary errors when matching Error entries.
@@ -146,7 +146,7 @@ func Error(err error, options ...option) logEntry {
146146
options = append(options, Data("error", err.Error()))
147147
}
148148

149-
return Entry(lager.ERROR, options...)
149+
return LogEntry(lager.ERROR, options...)
150150
}
151151

152152
// Fatal returns a log entry of type lager.FATAL that can be used with the
@@ -156,12 +156,12 @@ func Fatal(err error, options ...option) logEntry {
156156
options = append(options, Data("error", err.Error()))
157157
}
158158

159-
return Entry(lager.FATAL, options...)
159+
return LogEntry(lager.FATAL, options...)
160160
}
161161

162-
// Entry returns a log entry for the specified log level that can be used with
162+
// LogEntry returns a log entry for the specified log level that can be used with
163163
// the HaveLogged and ContainSequence matchers.
164-
func Entry(logLevel lager.LogLevel, options ...option) logEntry {
164+
func LogEntry(logLevel lager.LogLevel, options ...option) logEntry {
165165
entry := logEntry(lager.LogFormat{
166166
LogLevel: logLevel,
167167
Data: lager.Data{},

0 commit comments

Comments
 (0)