mirror of https://github.com/aria2/aria2
Suppress console log output for library use, enclose Platform in try-catch
Still need to suppress global::cerr and global::coutlibaria2
parent
f5d5d8fa8e
commit
315c05ea3c
|
@ -72,7 +72,13 @@ Platform* platform = 0;
|
||||||
|
|
||||||
int libraryInit()
|
int libraryInit()
|
||||||
{
|
{
|
||||||
platform = new Platform();
|
try {
|
||||||
|
platform = new Platform();
|
||||||
|
} catch(RecoverableException& e) {
|
||||||
|
A2_LOG_ERROR_EX(EX_EXCEPTION_CAUGHT, e);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
LogFactory::setConsoleOutput(false);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue