Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnishevent3
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
varnishevent3
Commits
6e39d606
Commit
6e39d606
authored
Oct 07, 2013
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
varnishevent: minor cleanup in varnishevent.c
parent
4165081e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
28 deletions
+12
-28
varnishevent.c
bin/varnishevent/varnishevent.c
+12
-28
No files found.
bin/varnishevent/varnishevent.c
View file @
6e39d606
...
...
@@ -33,33 +33,16 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* Obtain log data from the shared memory log
, order it by session ID, and
*
display it in Apache / NCSA combined log forma
t:
* Obtain log data from the shared memory log
and output single-line
*
events to an output stream. By default just like varnishncsa, bu
t:
*
* %h %l %u %t "%r" %s %b "%{Referer}i" "%{User-agent}i"
*
* where the fields are defined as follows:
*
* %h Client host name or IP address (always the latter)
* %l Client user ID as reported by identd (always "-")
* %u User ID if using HTTP authentication, or "-"
* %t Date and time of request
* %r Request line
* %s Status code
* %b Length of reply body, or "-"
* %{Referer}i Contents of "Referer" request header
* %{User-agent}i Contents of "User-agent" request header
*
* Actually, we cheat a little and replace "%r" with something close to
* "%m http://%{Host}i%U%q %H", where the additional fields are:
*
* %m Request method
* %{Host}i Contents of "Host" request header
* %U URL path
* %q Query string
* %H Protocol version
*
* TODO: - Maybe rotate/compress log
* - output lines may correspond to both client and backend transactions
* - also events on the pseudo fd 0, such as backend health checks, may be
* logged
* - output formats are defined for client, backend and "zero" events
* - some additional formatting tags are available
* - the internal architecture is designed to ensure that the VSL-reading
* process keeps pace with varnishd writing to VSL under heavy loads
*/
#include "config.h"
...
...
@@ -190,8 +173,8 @@ static inline logline_t
waits
++
;
if
(
!
WRT_Waiting
())
AZ
(
pthread_cond_wait
(
&
data_ready_cond
,
&
data_ready_lock
));
AZ
(
pthread_mutex_unlock
(
&
data_ready_lock
));
waiting
=
0
;
AZ
(
pthread_mutex_unlock
(
&
data_ready_lock
));
rdr_free
=
DATA_Take_Freelist
(
&
reader_freelist
);
LOG_Log
(
LOG_DEBUG
,
"Reader: took %u from free list"
,
rdr_free
);
}
...
...
@@ -440,10 +423,11 @@ event(void *priv, enum VSL_tag_e tag, unsigned fd,
AZ
(
lp
->
incomplete
);
AZ
(
lp
->
bitmap
);
AZ
(
lp
->
spec
);
AZ
(
lp
->
t
);
assert
(
lp
->
rx_headers
==
NULL
||
lp
->
rx_headers
->
nrec
==
0
);
assert
(
lp
->
tx_headers
==
NULL
||
lp
->
tx_headers
->
nrec
==
0
);
assert
(
lp
->
vcl_log
==
NULL
||
lp
->
vcl_log
->
nrec
==
0
);
/* XXX: assert that all lp->tag[i].len == 0 ? */
assert
(
lp
->
vcl_call
==
NULL
||
lp
->
vcl_call
->
nrec
==
0
);
t
=
TIM_real
();
fd_tbl
[
fd
].
ll
=
lp
;
...
...
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