|
Revision 7, 1.8 kB
(checked in by jesus, 13 years ago)
|
All of George's <george@lethargy.org> vhost additions.
New time rewriting so that timestamps are rewritten to reflect the time on the local machine running spreadlogd -- me.
|
- Property svn:eol-style set to
native
- Property svn:executable set to
*
- Property svn:keywords set to
Author Date Id Revision
|
| Line | |
|---|
| 1 |
%{ |
|---|
| 2 |
/* ====================================================================== |
|---|
| 3 |
* Copyright (c) 2000 Theo Schlossnagle |
|---|
| 4 |
* All rights reserved. |
|---|
| 5 |
* The following code was written by Theo Schlossnagle <jesus@omniti.com> |
|---|
| 6 |
* This code was written to facilitate clustered logging via Spread. |
|---|
| 7 |
* More information on Spread can be found at http://www.spread.org/ |
|---|
| 8 |
* Please refer to the LICENSE file before using this software. |
|---|
| 9 |
* ====================================================================== |
|---|
| 10 |
*/ |
|---|
| 11 |
|
|---|
| 12 |
#include <string.h> |
|---|
| 13 |
|
|---|
| 14 |
#include "config.h" |
|---|
| 15 |
#include "y.tab.h" |
|---|
| 16 |
|
|---|
| 17 |
extern int line_num; |
|---|
| 18 |
extern int semantic_errors; |
|---|
| 19 |
%} |
|---|
| 20 |
qstring \"[^\"]*\"|\'[^\']*\' |
|---|
| 21 |
string [^ \t\r\n#{}]+ |
|---|
| 22 |
%option noyywrap |
|---|
| 23 |
%% |
|---|
| 24 |
#.* {} /* Comments */ |
|---|
| 25 |
[ \t\r] {} /* White space */ |
|---|
| 26 |
\n { line_num++;} |
|---|
| 27 |
"{" { return OPENBRACE; } |
|---|
| 28 |
"}" { return CLOSEBRACE; } |
|---|
| 29 |
"=" { return EQUALS; } |
|---|
| 30 |
BufferSize { return BUFFERSIZE; } |
|---|
| 31 |
Spread { return SPREAD; } |
|---|
| 32 |
Port { return PORT; } |
|---|
| 33 |
Host { return HOST; } |
|---|
| 34 |
Log { return LOG; } |
|---|
| 35 |
VhostGroup { return VHOSTGROUP; } |
|---|
| 36 |
Group { return GROUP; } |
|---|
| 37 |
File { return FILENAME; } |
|---|
| 38 |
VhostDir { return VHOSTDIR; } |
|---|
| 39 |
Match { return MATCH; } |
|---|
| 40 |
RewriteTimestamp { return REWRITETIMES; } |
|---|
| 41 |
CommonLogFormat { return CLF; } |
|---|
| 42 |
{qstring} { int l = strlen(yytext); |
|---|
| 43 |
yytext[l-1] = 0; |
|---|
| 44 |
yylval = strdup(yytext+1); |
|---|
| 45 |
return STRING; } |
|---|
| 46 |
{string} { yylval = strdup(yytext); |
|---|
| 47 |
return STRING; } |
|---|
| 48 |
%% |
|---|