Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Michael Black
OpenXG-RAN
Commits
20e13db8
Commit
20e13db8
authored
Feb 14, 2022
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement logTerm() to close logging subsystem
parent
d2523bfa
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
0 deletions
+18
-0
common/utils/LOG/log.c
common/utils/LOG/log.c
+16
-0
common/utils/LOG/log.h
common/utils/LOG/log.h
+1
-0
openair1/SIMULATION/NR_PHY/dlschsim.c
openair1/SIMULATION/NR_PHY/dlschsim.c
+1
-0
No files found.
common/utils/LOG/log.c
View file @
20e13db8
...
...
@@ -411,6 +411,16 @@ int register_log_component(char *name,
return
computed_compidx
;
}
static
void
unregister_all_log_components
(
void
)
{
log_component_t
*
lc
=
&
g_log
->
log_component
[
0
];
while
(
lc
->
name
)
{
free
((
char
*
)
lc
->
name
);
// defined as const, but assigned through strdup()
free
(
lc
->
filelog_name
);
lc
++
;
}
}
int
isLogInitDone
(
void
)
{
if
(
g_log
==
NULL
)
...
...
@@ -502,6 +512,12 @@ int logInit (void)
return
0
;
}
void
logTerm
(
void
)
{
unregister_all_log_components
();
free_and_zero
(
g_log
);
}
#include <sys/syscall.h>
static
inline
int
log_header
(
log_component_t
*
c
,
char
*
log_buffer
,
...
...
common/utils/LOG/log.h
View file @
20e13db8
...
...
@@ -302,6 +302,7 @@ extern "C" {
# include "log_if.h"
/*----------------------------------------------------------------------------*/
int
logInit
(
void
);
void
logTerm
(
void
);
int
isLogInitDone
(
void
);
void
logRecord_mt
(
const
char
*
file
,
const
char
*
func
,
int
line
,
int
comp
,
int
level
,
const
char
*
format
,
...)
__attribute__
((
format
(
printf
,
6
,
7
)));
void
vlogRecord_mt
(
const
char
*
file
,
const
char
*
func
,
int
line
,
int
comp
,
int
level
,
const
char
*
format
,
va_list
args
);
...
...
openair1/SIMULATION/NR_PHY/dlschsim.c
View file @
20e13db8
...
...
@@ -666,6 +666,7 @@ int main(int argc, char **argv)
vcd_signal_dumper_close
();
loader_reset
();
logTerm
();
return
(
n_errors
);
}
...
...
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