Skip to content
This repository has been archived by the owner on Jan 17, 2024. It is now read-only.

Commit

Permalink
Merge branch 'develop' of github.com:mylockerteam/aLog
Browse files Browse the repository at this point in the history
  • Loading branch information
Apologiz committed Apr 1, 2019
2 parents 5bdf6a6 + 4c32a2a commit 9d0236b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion alog.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ func (a *Log) getTimeFormat() string {
}

func (a *Log) prepareLog(time time.Time, msg string, skip int) string {
if _, fileName, fileLine, ok := runtime.Caller(skip); ok && a.config.IgnoreFileLine {
if _, fileName, fileLine, ok := runtime.Caller(skip); ok && !a.config.IgnoreFileLine {
return fmt.Sprintf(
messageFormatWithFileLine,
time.Format(a.getTimeFormat()),
Expand Down
2 changes: 0 additions & 2 deletions alog_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@ func casesLogPrepareLog() []testsLogPrepareLog {
now := time.Now()
configFirst := configProvider()
configFirst.TimeFormat = time.RFC3339
configFirst.IgnoreFileLine = true
configSecond := configProvider()
configSecond.IgnoreFileLine = true
loggerErr := loggerProvider()
loggerErr.Strategies = append(loggerErr.Strategies, file.Get(""))
configSecond.Loggers = logger.Map{
Expand Down

0 comments on commit 9d0236b

Please sign in to comment.