Skip to content

Commit

Permalink
CocoaLumberjack#308 incorporated changes suggested by Ernesto and Dmi…
Browse files Browse the repository at this point in the history
…try to make the '\n' appending logic in the file logger more clear and performant
  • Loading branch information
Maciej Skolecki committed Jul 18, 2014
1 parent f55abaa commit bad4ee1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Lumberjack/DDFileLogger.m
Original file line number Diff line number Diff line change
Expand Up @@ -1082,7 +1082,8 @@ - (void)logMessage:(DDLogMessage *)logMessage

if (logMsg)
{
if ((isFormatted && _automaticallyAppendNewlineForCustomFormatters) || !isFormatted ) {
if (!isFormatted || _automaticallyAppendNewlineForCustomFormatters)
{
if (![logMsg hasSuffix:@"\n"])
{
logMsg = [logMsg stringByAppendingString:@"\n"];
Expand Down

0 comments on commit bad4ee1

Please sign in to comment.