diff --git a/cloudwatchlogs-with-dlq/cloudwatchlogs_lambda.js b/cloudwatchlogs-with-dlq/cloudwatchlogs_lambda.js index 31258c5..af75ee2 100644 --- a/cloudwatchlogs-with-dlq/cloudwatchlogs_lambda.js +++ b/cloudwatchlogs-with-dlq/cloudwatchlogs_lambda.js @@ -11,7 +11,7 @@ // Regex used to detect logs coming from lambda functions. // The regex will parse out the requestID and strip the timestamp // Example: 2016-11-10T23:11:54.523Z 108af3bb-a79b-11e6-8bd7-91c363cc05d9 some message -var consoleFormatRegex = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z\s(\w+?-\w+?-\w+?-\w+?-\w+)\s/; +var consoleFormatRegex = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z\s(\w+?-\w+?-\w+?-\w+?-\w+)\s(INFO|ERROR|WARN|DEBUG)?/; // Used to extract RequestID var requestIdRegex = /(?:RequestId:|Z)\s+([\w\d\-]+)/; diff --git a/cloudwatchlogs/cloudwatchlogs_lambda.js b/cloudwatchlogs/cloudwatchlogs_lambda.js index d76890e..4ff600b 100644 --- a/cloudwatchlogs/cloudwatchlogs_lambda.js +++ b/cloudwatchlogs/cloudwatchlogs_lambda.js @@ -29,7 +29,7 @@ var logStreamPrefixRegex = process.env.LOG_STREAM_PREFIX // Regex used to detect logs coming from lambda functions. // The regex will parse out the requestID and strip the timestamp // Example: 2016-11-10T23:11:54.523Z 108af3bb-a79b-11e6-8bd7-91c363cc05d9 some message -var consoleFormatRegex = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z\s(\w+?-\w+?-\w+?-\w+?-\w+)\s/; +var consoleFormatRegex = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z\s(\w+?-\w+?-\w+?-\w+?-\w+)\s(INFO|ERROR|WARN|DEBUG)?/; // Used to extract RequestID var requestIdRegex = /(?:RequestId:|Z)\s+([\w\d\-]+)/;