Skip to content

Commit

Permalink
Merge pull request #78 from kastiglione/asl-log-level
Browse files Browse the repository at this point in the history
Rectify mapping to ASL log level
  • Loading branch information
robbiehanson committed Dec 9, 2012
2 parents 2342727 + 2621e7c commit cce9f80
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Lumberjack/DDASLLogger.m
Expand Up @@ -76,15 +76,15 @@ - (void)logMessage:(DDLogMessage *)logMessage
const char *msg = [logMsg UTF8String];

int aslLogLevel;
switch (logMessage->logLevel)
switch (logMessage->logFlag)
{
// Note: By default ASL will filter anything above level 5 (Notice).
// So our mappings shouldn't go above that level.

case 1 : aslLogLevel = ASL_LEVEL_CRIT; break;
case 2 : aslLogLevel = ASL_LEVEL_ERR; break;
case 3 : aslLogLevel = ASL_LEVEL_WARNING; break;
default : aslLogLevel = ASL_LEVEL_NOTICE; break;
case LOG_FLAG_ERROR : aslLogLevel = ASL_LEVEL_CRIT; break;
case LOG_FLAG_WARN : aslLogLevel = ASL_LEVEL_ERR; break;
case LOG_FLAG_INFO : aslLogLevel = ASL_LEVEL_WARNING; break;
default : aslLogLevel = ASL_LEVEL_NOTICE; break;
}

asl_log(client, NULL, aslLogLevel, "%s", msg);
Expand Down

0 comments on commit cce9f80

Please sign in to comment.