mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2024-12-25 05:48:47 +01:00
logging: Fix creating empty file even when disabled (#2966)
* logging: Fix creating empty file even when disabled * Minor formatting fix Co-authored-by: staviq <staviq@gmail.com> --------- Co-authored-by: staviq <staviq@gmail.com>
This commit is contained in:
parent
52315a4216
commit
3358c381f6
@ -341,14 +341,14 @@ inline FILE *log_handler1_impl(bool change = false, LogTriState disable = LogTri
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_initialized)
|
|
||||||
{
|
|
||||||
if (_disabled)
|
if (_disabled)
|
||||||
{
|
{
|
||||||
// Log is disabled
|
// Log is disabled
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_initialized)
|
||||||
|
{
|
||||||
// with fallback in case something went wrong
|
// with fallback in case something went wrong
|
||||||
return logfile ? logfile : stderr;
|
return logfile ? logfile : stderr;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user