diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2013-10-19 09:10:34 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2013-10-19 09:10:34 +0300 |
commit | 33c78a97d97ed39775ac5041fcdf3ad3c854f11e (patch) | |
tree | 473ba3ce6b21b34bddd73303dc696d91d1e47a29 | |
parent | e0b67d9d57fb3dc2de0b8be6e97886443276f719 (diff) | |
download | vmod-binlog-33c78a97d97ed39775ac5041fcdf3ad3c854f11e.tar.gz vmod-binlog-33c78a97d97ed39775ac5041fcdf3ad3c854f11e.tar.bz2 |
Version 1.0release-1.0
-rw-r--r-- | NEWS | 19 | ||||
-rw-r--r-- | doc/binlogcat.1 | 6 | ||||
-rw-r--r-- | doc/binlogsel.1 | 34 | ||||
-rw-r--r-- | doc/vmod-binlog.3 | 22 | ||||
-rw-r--r-- | src/binlogsel.c | 2 |
5 files changed, 55 insertions, 28 deletions
@@ -0,0 +1,19 @@ | |||
1 | Vmod-binlog NEWS -- history of user-visible changes. 2013-10-19 | ||
2 | Copyright (C) 2013 Sergey Poznyakoff | ||
3 | See the end of file for copying conditions. | ||
4 | |||
5 | Please send Vmod-binlog bug reports to <gray@gnu.org> | ||
6 | |||
7 | Version 1.0, 2013-10-19 | ||
8 | |||
9 | Initial release. | ||
10 | |||
11 | |||
12 | Local variables: | ||
13 | mode: outline | ||
14 | paragraph-separate: "[ ]*$" | ||
15 | eval: (add-hook 'write-file-hooks 'time-stamp) | ||
16 | time-stamp-start: "changes. " | ||
17 | time-stamp-format: "%:y-%02m-%02d" | ||
18 | time-stamp-end: "\n" | ||
19 | end: | ||
diff --git a/doc/binlogcat.1 b/doc/binlogcat.1 index 886d842..5d49bfb 100644 --- a/doc/binlogcat.1 +++ b/doc/binlogcat.1 | |||
@@ -13,7 +13,7 @@ | |||
13 | .\" | 13 | .\" |
14 | .\" You should have received a copy of the GNU General Public License | 14 | .\" You should have received a copy of the GNU General Public License |
15 | .\" along with vmod-binlog. If not, see <http://www.gnu.org/licenses/>. | 15 | .\" along with vmod-binlog. If not, see <http://www.gnu.org/licenses/>. |
16 | .TH BINLOGCAT 1 "October 17, 2013" "BINLOGCAT" "User Reference" | 16 | .TH BINLOGCAT 1 "October 19, 2013" "BINLOGCAT" "User Reference" |
17 | .SH NAME | 17 | .SH NAME |
18 | binlogcat \- print binary log files in human-readable form | 18 | binlogcat \- print binary log files in human-readable form |
19 | .SH SYNOPSIS | 19 | .SH SYNOPSIS |
@@ -35,9 +35,9 @@ Print timestamps relative to first record in the file. | |||
35 | Precede each record by its number in the file (0-based). | 35 | Precede each record by its number in the file (0-based). |
36 | .TP | 36 | .TP |
37 | .B \-v | 37 | .B \-v |
38 | Print information about each file before dumpng it. | 38 | Print information about each file before dumping it. |
39 | .TP | 39 | .TP |
40 | .BI \-t FORMAT | 40 | .BI \-t " FORMAT" |
41 | Format timestamps according to \fIFORMAT\fR (see | 41 | Format timestamps according to \fIFORMAT\fR (see |
42 | .BR strftime (3)). | 42 | .BR strftime (3)). |
43 | Default is \fB%c\fR. | 43 | Default is \fB%c\fR. |
diff --git a/doc/binlogsel.1 b/doc/binlogsel.1 index eb7bc3a..8c6dfd2 100644 --- a/doc/binlogsel.1 +++ b/doc/binlogsel.1 | |||
@@ -13,11 +13,11 @@ | |||
13 | .\" | 13 | .\" |
14 | .\" You should have received a copy of the GNU General Public License | 14 | .\" You should have received a copy of the GNU General Public License |
15 | .\" along with vmod-binlog. If not, see <http://www.gnu.org/licenses/>. | 15 | .\" along with vmod-binlog. If not, see <http://www.gnu.org/licenses/>. |
16 | .TH BINLOGSEL 1 "October 18, 2013" "BINLOGSEL" "User Reference" | 16 | .TH BINLOGSEL 1 "October 19, 2013" "BINLOGSEL" "User Reference" |
17 | .SH NAME | 17 | .SH NAME |
18 | binlogsel \- select records from binary logs | 18 | binlogsel \- select records from binary logs |
19 | .SH SYNOPSIS | 19 | .SH SYNOPSIS |
20 | \fBbinlogsel\fR [\fB\-dnv\fR] [\fB\-D\fR \fIDIR\fR]\ | 20 | \fBbinlogsel\fR [\fB\-dnv\fR] [\fB\-D\fR \fIDIR\fR] [\fB\-i \fIN\fR]\ |
21 | [\fB\-p\fR \fIPATTERN\fR]\ [\fB\-t\fR \fIFORMAT\fR] | 21 | [\fB\-p\fR \fIPATTERN\fR]\ [\fB\-t\fR \fIFORMAT\fR] |
22 | [\fB\-I\fR \fITAG\fR] [\fB\-F\fR \fITIME\fR] [\fB\-T\fR \fITIME\fR]\ | 22 | [\fB\-I\fR \fITAG\fR] [\fB\-F\fR \fITIME\fR] [\fB\-T\fR \fITIME\fR]\ |
23 | 23 | ||
@@ -28,8 +28,10 @@ binlogsel \- select records from binary logs | |||
28 | \fBbinlogsel\fR [\fB\-hV\fR] | 28 | \fBbinlogsel\fR [\fB\-hV\fR] |
29 | .SH DESCRIPTION | 29 | .SH DESCRIPTION |
30 | .B Binlosel | 30 | .B Binlosel |
31 | selects from the binary logs the records that fall within the given | 31 | scans binary logs created by |
32 | time interval. The interval is specified using the | 32 | .BR vmod\-binlog (3) |
33 | module and selects from them the records that were created within the given | ||
34 | time intervals. A time interval is specified using the | ||
33 | .BI \-F " FROMTIME" | 35 | .BI \-F " FROMTIME" |
34 | and | 36 | and |
35 | .BI \-T " TOTIME" | 37 | .BI \-T " TOTIME" |
@@ -46,7 +48,7 @@ is omitted, the starting time is set to the time of the earliest | |||
46 | available log file. Finally, if neither of options is used, all | 48 | available log file. Finally, if neither of options is used, all |
47 | records will be output. In this case, the operation is equivalent | 49 | records will be output. In this case, the operation is equivalent |
48 | to that of the | 50 | to that of the |
49 | .B binlogcat | 51 | .BR binlogcat (1) |
50 | command. | 52 | command. |
51 | .PP | 53 | .PP |
52 | The argument to either option is a mostly free format human readable | 54 | The argument to either option is a mostly free format human readable |
@@ -62,15 +64,15 @@ in | |||
62 | If the | 64 | If the |
63 | .B info | 65 | .B info |
64 | program and coreutils documentation are properly installed at your site, use | 66 | program and coreutils documentation are properly installed at your site, use |
65 | the following command: | 67 | the following command to view it: |
66 | .PP | 68 | .PP |
67 | .EX | 69 | .EX |
68 | .B info coreutils 'Date input formats' | 70 | .B info coreutils 'Date input formats' |
69 | .EE | 71 | .EE |
70 | .PP | 72 | .PP |
71 | Several time intervals can be specified, provided that each of them is | 73 | Several time intervals can be specified, provided that each of them is |
72 | preceded by the \fB\-I\fR option, which introduces the tag to mark | 74 | preceded by the \fB\-I\fR option, which introduces the tag to identify |
73 | records falling within the time interval that follows it. This tag is | 75 | the records pertaining to that interval. This tag is |
74 | output before each record. For example: | 76 | output before each record. For example: |
75 | .PP | 77 | .PP |
76 | .EX | 78 | .EX |
@@ -84,7 +86,9 @@ records added within the last 2 days, which are prefixed by the string | |||
84 | .PP | 86 | .PP |
85 | The log files are searched in the directory specified with the | 87 | The log files are searched in the directory specified with the |
86 | \fB\-D\fR command line option. The \fB\-i\fR option can be used to | 88 | \fB\-D\fR command line option. The \fB\-i\fR option can be used to |
87 | define directory indexing level. | 89 | define directory indexing level. See |
90 | .BR vmod\-binlog (3), | ||
91 | for a description of the underlying directory structure. | ||
88 | .PP | 92 | .PP |
89 | If files are listed in the command line, the | 93 | If files are listed in the command line, the |
90 | .BR \-D , | 94 | .BR \-D , |
@@ -97,26 +101,25 @@ The default action of | |||
97 | .B binlogsel | 101 | .B binlogsel |
98 | is to print matching records on the standard output. This can be | 102 | is to print matching records on the standard output. This can be |
99 | changed by the use of loadable modules. A module is a dynamic library | 103 | changed by the use of loadable modules. A module is a dynamic library |
100 | that is loaded at program startup and provides functions for handling | 104 | which is loaded at program startup and provides functions for handling |
101 | records in a specific way. | 105 | records in a specific way. |
102 | .PP | 106 | .PP |
103 | The module to be loaded is supplied with the \fB\-m\fR option. For | 107 | The module to be loaded is supplied with the \fB\-m\fR option. For |
104 | example, the option \fB-m modname\fR instructs | 108 | example, the option \fB-m modname\fR instructs |
105 | .B binlogsel | 109 | .B binlogsel |
106 | to load library \fBmodname.so\fR. Additional arguments for the module | 110 | to load library \fBmodname.so\fR. Additional arguments for the module |
107 | initialization function can be supplied in the same option: | 111 | initialization function can be supplied in the same option (note quoting): |
112 | .PP | ||
108 | .EX | 113 | .EX |
109 | .B binlogsel -m 'modname -n arg' | 114 | .B binlogsel -m 'modname -n arg' |
110 | .EE | 115 | .EE |
111 | .PP | 116 | .PP |
112 | (note quoting). | ||
113 | .PP | ||
114 | The module to be loaded is searched in the library path, which | 117 | The module to be loaded is searched in the library path, which |
115 | consists initially of the single directory | 118 | consists initially of the single directory |
116 | \fI$prefix\fR\fB/lib/vmod\-binlog\fR. This path can be modified using | 119 | \fI$prefix\fR\fB/lib/vmod\-binlog\fR. This path can be modified using |
117 | the | 120 | the |
118 | .BI \-L " DIR" | 121 | .BI \-L " DIR" |
119 | option, which adds \fIDIR\fR to its and, or by the | 122 | option, which adds \fIDIR\fR to its end, or by the |
120 | .BI \-P " DIR" | 123 | .BI \-P " DIR" |
121 | option, which inserts its argument immediately before the default | 124 | option, which inserts its argument immediately before the default |
122 | library directory. | 125 | library directory. |
@@ -186,6 +189,9 @@ below, the symbols | |||
186 | looks for are listed without this prefix. Thus, for example, if the | 189 | looks for are listed without this prefix. Thus, for example, if the |
187 | module name is \fBstats.so\fR, the name of the module initialization | 190 | module name is \fBstats.so\fR, the name of the module initialization |
188 | function must be \fBstats_LTX_init\fR. | 191 | function must be \fBstats_LTX_init\fR. |
192 | .PP | ||
193 | .B Binlogsel | ||
194 | expects modules to export the following functions: | ||
189 | .TP | 195 | .TP |
190 | .BI "void init(char *" param ", void (*" addfn ")(const char *, const char *, const char *));" | 196 | .BI "void init(char *" param ", void (*" addfn ")(const char *, const char *, const char *));" |
191 | .B [OPTIONAL] | 197 | .B [OPTIONAL] |
diff --git a/doc/vmod-binlog.3 b/doc/vmod-binlog.3 index 7578615..f5f978d 100644 --- a/doc/vmod-binlog.3 +++ b/doc/vmod-binlog.3 | |||
@@ -13,7 +13,7 @@ | |||
13 | .\" | 13 | .\" |
14 | .\" You should have received a copy of the GNU General Public License | 14 | .\" You should have received a copy of the GNU General Public License |
15 | .\" along with vmod-binlog. If not, see <http://www.gnu.org/licenses/>. | 15 | .\" along with vmod-binlog. If not, see <http://www.gnu.org/licenses/>. |
16 | .TH VMOD-BINLOG 1 "October 18, 2013" "VMOD-BINLOG" "User Reference" | 16 | .TH VMOD-BINLOG 1 "October 19, 2013" "VMOD-BINLOG" "User Reference" |
17 | .SH NAME | 17 | .SH NAME |
18 | vmod\-binlog \- binary log file support for Varnish Cache. | 18 | vmod\-binlog \- binary log file support for Varnish Cache. |
19 | .SH SYNOPSIS | 19 | .SH SYNOPSIS |
@@ -78,7 +78,7 @@ Binary logs can be viewed using the | |||
78 | and | 78 | and |
79 | .BR binlogsel (3) | 79 | .BR binlogsel (3) |
80 | utilities. | 80 | utilities. |
81 | .PP | 81 | .SH FUNCTIONS |
82 | Binary log support is initialized by a call to | 82 | Binary log support is initialized by a call to |
83 | .B binlog.init | 83 | .B binlog.init |
84 | function (normally it is done in | 84 | function (normally it is done in |
@@ -87,7 +87,8 @@ function (normally it is done in | |||
87 | The | 87 | The |
88 | .B dir | 88 | .B dir |
89 | argument specifies the top-level storage directory. The | 89 | argument specifies the top-level storage directory. The |
90 | .B format argument defines the format of logfile entries. It is | 90 | .B format |
91 | argument defines the format of logfile entries. It is | ||
91 | a simplified form of Perl | 92 | a simplified form of Perl |
92 | .B pack() | 93 | .B pack() |
93 | template. See the | 94 | template. See the |
@@ -104,7 +105,7 @@ Set debugging level. | |||
104 | .TP | 105 | .TP |
105 | \fBpattern\fR=\fISTRING\fR | 106 | \fBpattern\fR=\fISTRING\fR |
106 | Sets pattern to use for log file names, instead of the default. | 107 | Sets pattern to use for log file names, instead of the default. |
107 | Argument can cont |