Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-UDR
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
Operations
Operations
Metrics
Environments
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
OpenXG
OpenXG-UDR
Commits
9943bed1
Commit
9943bed1
authored
Jun 22, 2022
by
Tien Thinh NGUYEN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update debug log
parent
79115a81
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
src/common/logger.cpp
src/common/logger.cpp
+0
-1
src/udr_app/mysql_db.cpp
src/udr_app/mysql_db.cpp
+10
-4
No files found.
src/common/logger.cpp
View file @
9943bed1
...
...
@@ -69,7 +69,6 @@ void Logger::_init(
m_system
=
new
_Logger
(
"system "
,
m_sinks
,
ss
.
str
().
c_str
());
m_config
=
new
_Logger
(
"configurations"
,
m_sinks
,
ss
.
str
().
c_str
());
m_udr_server
=
new
_Logger
(
"udr_server"
,
m_sinks
,
ss
.
str
().
c_str
());
m_udr_app
=
new
_Logger
(
"udr_app"
,
m_sinks
,
ss
.
str
().
c_str
());
m_udr_nrf
=
new
_Logger
(
"udr_nrf"
,
m_sinks
,
ss
.
str
().
c_str
());
m_udr_mysql
=
new
_Logger
(
"udr_mysql"
,
m_sinks
,
ss
.
str
().
c_str
());
}
...
...
src/udr_app/mysql_db.cpp
View file @
9943bed1
...
...
@@ -104,11 +104,17 @@ bool mysql_db::close_connection() {
//---------------------------------------------------------------------------------------------
void
mysql_db
::
start_event_connection_handling
()
{
Logger
::
udr_mysql
().
debug
(
"Start Event Connection Handling"
);
std
::
time_t
current_time
=
std
::
chrono
::
system_clock
::
to_time_t
(
std
::
chrono
::
system_clock
::
now
());
Logger
::
udr_mysql
().
debug
(
"Start Event Connection Handling (current time %s)"
,
std
::
ctime
(
&
current_time
));
// get current time
uint64_t
ms
=
std
::
chrono
::
duration_cast
<
std
::
chrono
::
milliseconds
>
(
std
::
chrono
::
system_clock
::
now
().
time_since_epoch
())
.
count
();
struct
itimerspec
its
;
its
.
it_value
.
tv_sec
=
udr_cfg
.
mysql
.
connection_timeout
;
// seconds
its
.
it_value
.
tv_nsec
=
0
;
// 100 * 1000 * 1000; //100ms
...
...
@@ -122,9 +128,9 @@ void mysql_db::start_event_connection_handling() {
}
//---------------------------------------------------------------------------------------------
void
mysql_db
::
trigger_connection_handling_procedure
(
uint64_t
ms
)
{
//
_unused(ms);
Logger
::
udr_mysql
().
debug
(
"Connection Handling procedure (current time %ld
)"
,
ms
);
_unused
(
ms
);
//
Logger::udr_mysql().debug(
// "Connection Handling procedure (current time %ld (ms)
)", ms);
if
(
mysql_ping
(
&
mysql_connector
))
{
Logger
::
udr_app
().
warn
(
...
...
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