Developer Documentation
# Let's Data : Focus on the data - we'll manage the infrastructure!
Cloud infrastructure that simplifies how you process, analyze and transform data.
Logs
The #Let's Data infrastructure uses the Apache Log4j and the Slf4j java libraries and their integration with AWS Lambda to emit logs from the code. Users can write the logging code with the familiarity of these popular libraries.
The logging infrastructure is fully setup and up and running by default, so users can just start logging. However, advanced users can do additional customizations if needed. (such as defining a log4j.properties in the jar and adding log config, for example, enable / disable logging from a class)
Log Format
We've defined a simple json layout for the #Let's Data logs that includes the log message (includes the parameters), date timestamps and logging code instrumentation. Here is the log format schema and example logs:
Log Code
Log emission is simple- Import the logger factory class, instantiate the logger instance in the class and log the messages. Here is a quick snippet:
Messages with log parameters can be logged by adding log format replacement anchors in the log message string. For example:
Alternately, you can also define these inline:
Though I believe the latter would do a strcat right away whereas the former would defer that to when it is needed to be logged (for example if DEBUG level is disabled, then this strcat will never happen). While this seems like an academic concern, on high scale we've observed that such logging optimizations can noticeably reduce the lambda execution time by seconds. But either way should be fine for starters.