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
948562e3
Commit
948562e3
authored
Apr 12, 2015
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change the formatter interface to pass in a pointer to an arg_t
parent
ca8d0107
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
225 additions
and
257 deletions
+225
-257
format.c
src/format.c
+77
-157
format.h
src/format.h
+7
-2
test_format.c
src/test/test_format.c
+141
-98
No files found.
src/format.c
View file @
948562e3
This diff is collapsed.
Click to expand it.
src/format.h
View file @
948562e3
...
...
@@ -34,8 +34,13 @@
/* XXX: should be static, init as fixed size with length max_reclen + 1 */
struct
vsb
*
payload
;
typedef
void
formatter_f
(
const
tx_t
*
tx
,
char
*
name
,
enum
VSL_tag_e
tag
,
char
**
s
,
size_t
*
len
);
typedef
struct
arg_t
{
char
*
name
;
enum
VSL_tag_e
tag
;
}
arg_t
;
typedef
void
formatter_f
(
const
tx_t
*
tx
,
const
arg_t
*
args
,
char
**
s
,
size_t
*
len
);
char
*
get_payload
(
const
logline_t
*
rec
);
logline_t
*
get_tag
(
const
tx_t
*
tx
,
enum
VSL_tag_e
tag
);
...
...
src/test/test_format.c
View file @
948562e3
This diff is collapsed.
Click to expand it.
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