Adding Structured Data to Log::Any

20 minutes

Any

English 

For decades, logging meant printing boring text into plain file descriptors so they end up in endless log files we manually had to grep through. But no longer - with Elasticsearch (a schema-free real-time document-oriented database), we can store arbitrary application logs in a central place and analyze them live, either visualized or via API.

However, many error messages and warnings are of little use unless you know the context they occurred in - the module, file and line, but further extending to "what work was being done" - the value of variables, the URL of the request, session and query parameters, etc - information that is available in the Perl process and that needs to be available for later analysis.

Here, I'm presenting a to-be-released improvement to Log::Any (as a possible first hop between the Perl program and Elasticsearch) to allow adding contextual structured data to log messages. 

[ Abstract - Talk ]