Gzlogs

  1. Introduction
  2. Download
  3. Installation
  4. Usage
  5. About me
  6. Related links

Introduction

Gzlogs is based on cronolog 1.6.2 and zlib 1.2.3. It is a simple filter program that is used in conjunction with Apache's piped logfile feature to export log data into gzipped log files which file name is specified by current time. For example:

CustomLog "|/usr/bin/gzlogs /usr/local/apache/logs/access%Y%m%d.log.gz" combined

This creates the files /usr/local/apache/logs/accessyyyymmdd.log.gz where yyyymmdd is the system date at which the log nominally starts. At the end of each rotation time (here is 00:00:00 each day) a new log is started. If log files of your apache server are very large each day, maybegzlogs is the better choice for you instead of rotatelogs and cronolog.

Gzlogs has been tested in CENT OS 4.4, Redhat Enterprise Linux AS 4, Windows 2003 SP1+ Cygwin 1.5.21.

Download

Version 1.0
gzlogs.1.0.tar.gz 126KB

Installation

  1. tar xvzf gzlogs.1.0.tar.gz
  2. cd gzlogs.1.0
  3. make
  4. cp gzlogs /usr/bin

In windows platform, you need install cygwin at first.

Usage

Gzlogs need be used in Apache CustomLog directive as so:

CustomLog "|/path/to/gzlogs [OPTIONS] logfile-spec" [format]

Gzlogs options

--compresslevel=LEVEL 1: compress faster
9: comress better

Template specifiers of gzlogs are same as cronolog. Please view them from http://cronolog.org/usage.html.

About me

I am a Chinese programmer, living in Beijing, China with my wife now. I started programming on an apple II as teenager and became a occupational programmer at 1996. I love programming. Now I develop log analysis software using c++ as a freelancer. Most time, I'm working on Windows platform, gzlogs is my first linux program.

Outside computers, I like climbing, long-distance running, backpacking.

If you have any question, advices or find any bugs about gzlogs, please contact me at cuiyj@nihuo.com.

Related links