mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 04:04:16 +00:00
open log stream in log thread
This commit is contained in:
parent
4145251afd
commit
0ad3078524
2
Log.cpp
2
Log.cpp
@ -72,7 +72,6 @@ namespace log {
|
|||||||
{
|
{
|
||||||
if (!m_IsRunning)
|
if (!m_IsRunning)
|
||||||
{
|
{
|
||||||
Reopen ();
|
|
||||||
m_IsRunning = true;
|
m_IsRunning = true;
|
||||||
m_Thread = new std::thread (std::bind (&Log::Run, this));
|
m_Thread = new std::thread (std::bind (&Log::Run, this));
|
||||||
}
|
}
|
||||||
@ -162,6 +161,7 @@ namespace log {
|
|||||||
|
|
||||||
void Log::Run ()
|
void Log::Run ()
|
||||||
{
|
{
|
||||||
|
Reopen ();
|
||||||
while (m_IsRunning)
|
while (m_IsRunning)
|
||||||
{
|
{
|
||||||
std::shared_ptr<LogMsg> msg;
|
std::shared_ptr<LogMsg> msg;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user