Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
6
66
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Eric Vidal
66
Commits
1417a4e4
Commit
1417a4e4
authored
5 years ago
by
Eric Vidal
Browse files
Options
Downloads
Patches
Plain Diff
allow none as timestamp for a logger
parent
0e32a3f8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/include/66/enum.h
+1
-0
1 addition, 0 deletions
src/include/66/enum.h
src/include/66/parser.h
+1
-1
1 addition, 1 deletion
src/include/66/parser.h
src/lib66/get_enum.c
+3
-1
3 additions, 1 deletion
src/lib66/get_enum.c
src/lib66/parser_write.c
+7
-7
7 additions, 7 deletions
src/lib66/parser_write.c
with
12 additions
and
9 deletions
src/include/66/enum.h
+
1
−
0
View file @
1417a4e4
...
...
@@ -83,6 +83,7 @@ enum key_enum_e
//Time
TAI
,
// = 50
ISO
,
NONE
,
ENDOFKEY
}
;
#define PIPELINE_NAME "pipeline-name"
...
...
This diff is collapsed.
Click to expand it.
src/include/66/parser.h
+
1
−
1
View file @
1417a4e4
...
...
@@ -72,7 +72,7 @@ struct sv_execlog_s
unsigned
int
destination
;
uint32_t
backup
;
uint32_t
maxsize
;
/**timestamp=
49
->tai,timestamp=5
0
->iso*/
/**timestamp=
50
->tai,timestamp=5
1
->iso
,52->none
*/
int
timestamp
;
unsigned
int
idga
;
//pos in genalloc gadeps
unsigned
int
nga
;
//len of idga in genalloc gadeps
...
...
This diff is collapsed.
Click to expand it.
src/lib66/get_enum.c
+
3
−
1
View file @
1417a4e4
...
...
@@ -77,6 +77,7 @@ char const *get_keybyid(key_enum_t key)
//Time
(
key
==
TAI
)
?
"tai"
:
(
key
==
ISO
)
?
"iso"
:
(
key
==
NONE
)
?
"none"
:
//logger
(
key
==
PRODUCER
)
?
"producer-for"
:
(
key
==
CONSUMER
)
?
"consumer-for"
:
...
...
@@ -104,5 +105,6 @@ int const key_enum_options_el = DOWN - LOGGER ;
int
const
key_enum_flags_el
=
AUTO
-
DOWN
;
int
const
key_enum_build_el
=
NEED
-
AUTO
;
int
const
key_enum_mandatory_el
=
TAI
-
NEED
;
int
const
key_enum_time_el
=
ENDOFKEY
-
TAI
;
int
const
key_enum_time_el
=
PRODUCER
-
TAI
;
int
const
key_enum_logger_el
=
ENDOFKEY
-
PRODUCER
;
This diff is collapsed.
Click to expand it.
src/lib66/parser_write.c
+
7
−
7
View file @
1417a4e4
...
...
@@ -319,7 +319,7 @@ int write_logger(sv_alltype *sv, sv_execlog *log,char const *name, char const *d
char
*
time
=
NULL
;
char
*
pmax
=
NULL
;
char
*
pback
=
NULL
;
char
*
timestamp
=
NULL
;
char
*
timestamp
=
"t"
;
char
max
[
UINT32_FMT
]
;
char
back
[
UINT32_FMT
]
;
char
const
*
userhome
;
...
...
@@ -447,10 +447,7 @@ int write_logger(sv_alltype *sv, sv_execlog *log,char const *name, char const *d
}
if
(
!
stralloc_0
(
&
destlog
))
retstralloc
(
0
,
"write_logger"
)
;
if
(
log
->
timestamp
==
TAI
)
timestamp
=
"t"
;
else
timestamp
=
"T"
;
if
(
log
->
timestamp
==
ISO
)
timestamp
=
"T"
;
if
(
log
->
backup
>
0
)
{
...
...
@@ -474,8 +471,11 @@ int write_logger(sv_alltype *sv, sv_execlog *log,char const *name, char const *d
if
(
!
stralloc_cats
(
&
exec
,
S6_BINPREFIX
"s6-log "
"n"
))
retstralloc
(
0
,
"write_logger"
)
;
if
(
!
stralloc_cats
(
&
exec
,
pback
))
retstralloc
(
0
,
"write_logger"
)
;
if
(
!
stralloc_cats
(
&
exec
,
" "
))
retstralloc
(
0
,
"write_logger"
)
;
if
(
!
stralloc_cats
(
&
exec
,
timestamp
))
retstralloc
(
0
,
"write_logger"
)
;
if
(
!
stralloc_cats
(
&
exec
,
" "
))
retstralloc
(
0
,
"write_logger"
)
;
if
(
log
->
timestamp
)
{
if
(
!
stralloc_cats
(
&
exec
,
timestamp
))
retstralloc
(
0
,
"write_logger"
)
;
if
(
!
stralloc_cats
(
&
exec
,
" "
))
retstralloc
(
0
,
"write_logger"
)
;
}
if
(
!
stralloc_cats
(
&
exec
,
"s"
))
retstralloc
(
0
,
"write_logger"
)
;
if
(
!
stralloc_cats
(
&
exec
,
pmax
))
retstralloc
(
0
,
"write_logger"
)
;
if
(
!
stralloc_cats
(
&
exec
,
" "
))
retstralloc
(
0
,
"write_logger"
)
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment