Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cloudflare-to-apache

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cloudflare-to-apache

Script to convert Cloudflare log format to Apache log format

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Cloudflare to Apache

A small script to convert Cloudflare log format to match that of Apache. So you can import the logs into things like Piwik.

Cloudflare format

New format

host<space>IP<space>-<space>-<space>Request date<space>"Request"<space>Response code<space>Response time<space>"Referrer"<space>"User agent"<space>Hash

Old format

host<space>IP<space>Request timestamp<space>"Request"<space>Response code<space>Response time<space>"User Agent"<space>"Bot?"<space>"Referrer"

Apache format

IP - - [Request date string]<space>"Request"<space>Response code<space>-<space>"Referrer"<space>"User agent"

Usage

Simple

npm i -g cloudflare-to-apache
cloudflare-to-apache < inputFile > outputFile

To convert the older style format simply do:

cloudflare-to-apache -f old < inputFile > outputFile

Manual

node index < $inputFile > $outputFile

Outputting to a file

DEBUG=* node index apache.log < $inputFile

DEBUG=* outputs debug information to the terminal.

Status

Tests currently run fine on Ubuntu (14.04) and OSX, not sure why they aren't running on travisci. Need to investigate and fix.

Build Status

Dependency Status

Keywords

FAQs

Package last updated on 07 Jan 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc