Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnishevent
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
varnishevent
Commits
77977702
Commit
77977702
authored
Apr 14, 2015
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
the event handler (dispatcher function) filters the transaction
types to be logged
parent
bd388e40
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
varnishevent.c
src/varnishevent.c
+11
-8
No files found.
src/varnishevent.c
View file @
77977702
...
...
@@ -121,6 +121,7 @@ static unsigned rdr_tx_free = 0;
static
char
cli_config_filename
[
BUFSIZ
]
=
""
;
static
int
tx_type_log
[
VSL_t__MAX
];
static
char
tx_type_name
[
VSL_t__MAX
];
void
...
...
@@ -227,14 +228,8 @@ event(struct VSL_data *vsl, struct VSL_transaction * const pt[], void *priv)
for
(
struct
VSL_transaction
*
t
=
pt
[
0
];
t
!=
NULL
;
t
=
*++
pt
)
{
struct
tx_t
*
tx
;
switch
(
t
->
type
)
{
case
VSL_t_req
:
case
VSL_t_bereq
:
case
VSL_t_raw
:
break
;
default:
if
(
!
tx_type_log
[
t
->
type
])
continue
;
}
tx
=
take_tx
();
if
(
tx
==
NULL
)
{
...
...
@@ -661,8 +656,16 @@ main(int argc, char *argv[])
VTIM_sleep
(
1
);
}
for
(
int
i
=
0
;
i
<
VSL_t__MAX
;
i
++
)
for
(
int
i
=
0
;
i
<
VSL_t__MAX
;
i
++
)
{
tx_type_log
[
i
]
=
0
;
tx_type_name
[
i
]
=
'X'
;
}
if
(
!
EMPTY
(
config
.
cformat
))
tx_type_log
[
VSL_t_req
]
=
1
;
if
(
!
EMPTY
(
config
.
bformat
))
tx_type_log
[
VSL_t_bereq
]
=
1
;
if
(
!
EMPTY
(
config
.
rformat
))
tx_type_log
[
VSL_t_raw
]
=
1
;
tx_type_name
[
VSL_t_req
]
=
'c'
;
tx_type_name
[
VSL_t_bereq
]
=
'b'
;
tx_type_name
[
VSL_t_raw
]
=
'-'
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment