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
1bec84c2
Commit
1bec84c2
authored
Dec 06, 2016
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add the -l option
parent
46aac195
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
8 deletions
+22
-8
varnishevent.rst
doc/varnishevent.rst
+13
-5
varnishevent.c
src/varnishevent.c
+9
-3
No files found.
doc/varnishevent.rst
View file @
1bec84c2
...
...
@@ -7,7 +7,7 @@ Display Varnish log contents in formats for client, backend and other events
----------------------------------------------------------------------------
:Author: Geoffrey Simmons
:Date: 201
5-04-22
:Date: 201
6-12-06
:Version: 4.0
:Manual section: 1
...
...
@@ -15,9 +15,12 @@ Display Varnish log contents in formats for client, backend and other events
SYNOPSIS
========
varnishevent [-a] [-d] [-D] [-f configfile] [-F format] [-g grouping]
[-L txlimit] [-n varnish_name] [-N vsmfile] [-P file]
[-q query] [-r file] [-T txtimeout] [-v] [-V] [-w file]
::
varnishevent [-a] [-d] [-D] [-f configfile] [-F format] [-g grouping]
[-L txlimit] [-n varnish_name] [-N vsmfile] [-P file]
[-q query] [-r file] [-T txtimeout] [-v] [-V] [-w file]
[-l logfile]
DESCRIPTION
...
...
@@ -77,6 +80,11 @@ OPTIONS
Print program usage and exit
-l logfile
Write the application log to ``logfile``. By default,
syslog(3) is used.
-L limit
Sets the upper limit of incomplete transactions kept before
...
...
@@ -403,7 +411,7 @@ Parameter CLI Option Description
``max.reclen`` The maximum length of a Varnish log entry in characters. Should be equal to the Varnish 255 (default ``shm_reclen`` in Varnish 4)
parameter ``shm_reclen``.
---------------------- ---------- ----------------------------------------------------------------------------------------- -------
``log.file``
Log file for status, warning, debug and error messages, and monitoring statistics. If '-' ``syslog(3)``
``log.file``
``-l``
Log file for status, warning, debug and error messages, and monitoring statistics. If '-' ``syslog(3)``
is specified, then log messages are written to stdout.
---------------------- ---------- ----------------------------------------------------------------------------------------- -------
``monitor.interval`` Interval in seconds at which monitoring statistics are emitted to the log (either 30
...
...
src/varnishevent.c
View file @
1bec84c2
...
...
@@ -550,7 +550,8 @@ usage(int status)
"usage: varnishevent [-adDhvV] [-f configfile] [-F format]
\n
"
" [-g grouping] [-L txlimit] [-n name]
\n
"
" [-N vsmfile] [-P pidfile] [-q query]
\n
"
" [-r binlog] [-T txtimeout] [-w outputfile]
\n
"
);
" [-r binlog] [-T txtimeout] [-w outputfile]
\n
"
" [-l logfile]
\n
"
);
exit
(
status
);
}
...
...
@@ -559,7 +560,7 @@ main(int argc, char *argv[])
{
int
c
,
errnum
,
status
,
a_flag
=
0
,
v_flag
=
0
,
d_flag
=
0
,
D_flag
=
0
;
char
*
P_arg
=
NULL
,
*
w_arg
=
NULL
,
*
q_arg
=
NULL
,
*
g_arg
=
NULL
,
*
n_arg
=
NULL
,
*
N_arg
=
NULL
,
scratch
[
BUFSIZ
];
*
n_arg
=
NULL
,
*
N_arg
=
NULL
,
*
l_arg
=
NULL
,
scratch
[
BUFSIZ
];
char
cli_config_filename
[
PATH_MAX
+
1
]
=
""
;
struct
vpf_fh
*
pfh
=
NULL
;
struct
VSL_data
*
vsl
;
...
...
@@ -575,7 +576,7 @@ main(int argc, char *argv[])
CONF_Init
();
read_default_config
();
while
((
c
=
getopt
(
argc
,
argv
,
"adDhvVP:w:F:g:f:q:r:n:N:L:T:"
))
!=
-
1
)
{
while
((
c
=
getopt
(
argc
,
argv
,
"adDhvVP:w:F:g:f:q:r:n:N:L:T:
l:
"
))
!=
-
1
)
{
switch
(
c
)
{
case
'a'
:
a_flag
=
1
;
...
...
@@ -624,6 +625,9 @@ main(int argc, char *argv[])
}
bprintf
(
cli_config_filename
,
"%s"
,
optarg
);
break
;
case
'l'
:
REPLACE
(
l_arg
,
optarg
);
break
;
case
'q'
:
REPLACE
(
q_arg
,
optarg
);
break
;
...
...
@@ -689,6 +693,8 @@ main(int argc, char *argv[])
}
#endif
if
(
l_arg
!=
NULL
)
bprintf
(
config
.
log_file
,
"%s"
,
l_arg
);
if
(
LOG_Open
(
VSB_data
(
config
.
syslog_ident
))
!=
0
)
{
exit
(
EXIT_FAILURE
);
}
...
...
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