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
8a1ca837
Commit
8a1ca837
authored
Oct 07, 2013
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
varnishevent: dump the config to log on USR1 and ABRT signals
parent
c00004d2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
5 deletions
+13
-5
config.c
bin/varnishevent/config.c
+11
-3
handler.c
bin/varnishevent/handler.c
+1
-0
varnishevent.c
bin/varnishevent/varnishevent.c
+1
-0
varnishevent.h
bin/varnishevent/varnishevent.h
+0
-2
No files found.
bin/varnishevent/config.c
View file @
8a1ca837
...
...
@@ -190,6 +190,7 @@ CONF_Init(void)
config
.
log_file
[
0
]
=
'\0'
;
config
.
varnish_bindump
[
0
]
=
'\0'
;
config
.
syslog_facility
=
LOG_LOCAL0
;
strcpy
(
config
.
syslog_facility_name
,
"LOCAL0"
);
config
.
monitor_interval
=
30
;
config
.
output_bufsiz
=
BUFSIZ
;
...
...
@@ -267,9 +268,8 @@ CONF_ReadFile(const char *file) {
}
#define confdump(str,val) \
LOG_Log(LOG_
DEBUG
, "config: " str, (val))
LOG_Log(LOG_
INFO
, "config: " str, (val))
#if 0
void
CONF_Dump
(
void
)
{
...
...
@@ -281,12 +281,20 @@ CONF_Dump(void)
confdump
(
"output.file = %s"
,
EMPTY
(
config
.
output_file
)
?
"stdout"
:
config
.
output_file
);
confdump
(
"append = %u"
,
config
.
append
);
confdump
(
"cformat = %s"
,
config
.
cformat
);
confdump
(
"bformat = %s"
,
config
.
bformat
);
confdump
(
"zformat = %s"
,
config
.
zformat
);
confdump
(
"syslog.facility = %s"
,
config
.
syslog_facility_name
);
confdump
(
"syslog.ident = %s"
,
config
.
syslog_ident
);
confdump
(
"monitor.interval = %u"
,
config
.
monitor_interval
);
confdump
(
"max.reclen = %u"
,
config
.
max_reclen
);
confdump
(
"max.headers = %u"
,
config
.
max_headers
);
confdump
(
"max.vcl_log = %u"
,
config
.
max_vcl_log
);
confdump
(
"max.vcl_call = %u"
,
config
.
max_vcl_call
);
confdump
(
"max.fd = %u"
,
config
.
max_fd
);
confdump
(
"max.data = %u"
,
config
.
max_data
);
confdump
(
"housekeep.interval = %u"
,
config
.
housekeep_interval
);
confdump
(
"ttl = %u"
,
config
.
ttl
);
confdump
(
"output.bufsiz = %u"
,
config
.
output_bufsiz
);
confdump
(
"user = %s"
,
config
.
user_name
);
}
#endif
bin/varnishevent/handler.c
View file @
8a1ca837
...
...
@@ -178,6 +178,7 @@ HNDL_Abort(int sig)
LOG_Log
(
LOG_ALERT
,
"Received signal %d (%s), stacktrace follows"
,
sig
,
strsignal
(
sig
));
stacktrace
();
CONF_Dump
();
DATA_Dump
();
MON_Output
();
LOG_Log0
(
LOG_ALERT
,
"Aborting"
);
...
...
bin/varnishevent/varnishevent.c
View file @
8a1ca837
...
...
@@ -496,6 +496,7 @@ static void
dump
(
int
sig
)
{
(
void
)
sig
;
CONF_Dump
();
DATA_Dump
();
}
...
...
bin/varnishevent/varnishevent.h
View file @
8a1ca837
...
...
@@ -185,9 +185,7 @@ void RDR_Stats(void);
void
CONF_Init
(
void
);
int
CONF_Add
(
const
char
*
lval
,
const
char
*
rval
);
int
CONF_ReadFile
(
const
char
*
file
);
#if 0
void
CONF_Dump
(
void
);
#endif
/* log.c */
#define EMPTY(s) (s[0] == '\0')
...
...
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