Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/librecat/catmandu-importer-apachelog

Catmandu Importer for apache log entries
https://github.com/librecat/catmandu-importer-apachelog

Last synced: 4 days ago
JSON representation

Catmandu Importer for apache log entries

Awesome Lists containing this project

README

        

# NAME

Catmandu::Importer::ApacheLog - Catmandu importer for importing log entries

# STATUS

[![Build Status](https://travis-ci.org/LibreCat/Catmandu-Importer-ApacheLog.svg?branch=master)](https://travis-ci.org/LibreCat/Catmandu-Importer-ApacheLog)
[![Coverage](https://coveralls.io/repos/LibreCat/Catmandu-Importer-ApacheLog/badge.png?branch=master)](https://coveralls.io/r/LibreCat/Catmandu-Importer-ApacheLog)
[![CPANTS kwalitee](http://cpants.cpanauthors.org/dist/Catmandu-Importer-ApacheLog.png)](http://cpants.cpanauthors.org/dist/Catmandu-Importer-ApacheLog)

# DESCRIPTION

This importer reads every entry in the log file, and put the log entries (status, rhost ..) into a record.
The original line is stored in the attribute '\_log'.

# METHODS

## new ( file => $file, fix => $fix, formats => \['combined','common'\] )

- file

File to import. Can also be a string reference or a file handle. See L

- fix

Fix to apply to every record. See L

- formats

Array reference of formats

By default ['combined','common']

For more information see L, and look for the option 'fast'.

# SYNOPSIS

#!/usr/bin/env perl
use Catmandu::Importer::ApacheLog;
use Data::Dumper;

my $importer = Catmandu::Importer::ApacheLog->new(
file => "/var/log/httpd/access_log"
);

$importer->each(sub{
print Dumper(shift);
});

#!/bin/bash
catmandu convert ApacheLog --file access.log to YAML

# AUTHORS

Nicolas Franck C<< >>

# SEE ALSO

L, L , L