Chapter 2. Writing a New DLF Converter

Table of Contents

Prerequisites
The common_syslog Log Format
Creating the DLF Converter Skeleton
Adding a Constructor
The Meta-Data Methods
The DLF Converter Name
Providing Information To Users
Providing Information to the Framework
The Conversion Methods
Registering Your DLF Converter with the Lire Framework
DLF Converter API

Before Lire™ can do various analysis and generate reports on the data contained in your various log files, it must first be converted to a common data model. This is specifically the job of the DLF converter.

So if you want to generate the same reports for your RealServer™ log files (currently unsupported) than for you web server, you only need to develop a DLF converter which maps the RealServer content to the www DLF schema.

Note

If no existing DLF schemas represent correctly the domain of your application log file, it is easy to develop a new one. Consult the chapter Chapter 3, Writing a DLF Schema for the whole story.

This chapter will show you through an example how to develop a new DLF converter for a kind of useless log format: the common log format encapsulated in syslog. (It is useless because there is not many reasons to make your web server logs it requests through syslog. And it would be probably be simpler to just use the cut command to remove the syslog header.)

Note

The doc/examples in the source distribution contains anoother commented example which could serve as a starting point for your converters.

Prerequisites

Developing a new DLF converter requires some basic programming skills in perl. Altough not strictly necessarily, you should be familiar with perl object-oriented programming model. If you aren't, you should read perltoot(1) before continuing.