change some log level to error back

pull/1910/head
weko 1 year ago
parent e36d5634e7
commit 710a35993d

@ -262,7 +262,7 @@ namespace util
restricted = idents.size() > 0;
}
if(!restricted)
LogPrint(eLogCritical, "Daemon: No trusted routers of families specified");
LogPrint(eLogError, "Daemon: No trusted routers of families specified");
}
bool hidden; i2p::config::GetOption("trust.hidden", hidden);

@ -1482,7 +1482,7 @@ namespace http {
}
catch (std::exception& ex)
{
LogPrint (eLogCritical, "HTTPServer: Runtime exception: ", ex.what ());
LogPrint (eLogError, "HTTPServer: Runtime exception: ", ex.what ());
}
}
}

@ -115,7 +115,7 @@ namespace client
try {
m_Service.run ();
} catch (std::exception& ex) {
LogPrint (eLogCritical, "I2PControl: Runtime exception: ", ex.what ());
LogPrint (eLogError, "I2PControl: Runtime exception: ", ex.what ());
}
}
}

@ -72,7 +72,7 @@ namespace transport
}
catch (std::exception& ex)
{
LogPrint (eLogCritical, "UPnP: Runtime exception: ", ex.what ());
LogPrint (eLogError, "UPnP: Runtime exception: ", ex.what ());
PortMapping ();
}
}

@ -81,7 +81,7 @@ namespace i2p
if (pid < 0) // error
{
LogPrint(eLogCritical, "Daemon: Could not fork: ", strerror(errno));
LogPrint(eLogError, "Daemon: Could not fork: ", strerror(errno));
std::cerr << "i2pd: Could not fork: " << strerror(errno) << std::endl;
return false;
}
@ -91,7 +91,7 @@ namespace i2p
int sid = setsid();
if (sid < 0)
{
LogPrint(eLogCritical, "Daemon: Could not create process group.");
LogPrint(eLogError, "Daemon: Could not create process group.");
std::cerr << "i2pd: Could not create process group." << std::endl;
return false;
}
@ -121,10 +121,10 @@ namespace i2p
LogPrint(eLogInfo, "Daemon: Set max number of open files to ",
nfiles, " (system limit is ", limit.rlim_max, ")");
} else {
LogPrint(eLogCritical, "Daemon: Can't set max number of open files: ", strerror(errno));
LogPrint(eLogError, "Daemon: Can't set max number of open files: ", strerror(errno));
}
} else {
LogPrint(eLogCritical, "Daemon: limits.openfiles exceeds system limit: ", limit.rlim_max);
LogPrint(eLogError, "Daemon: limits.openfiles exceeds system limit: ", limit.rlim_max);
}
uint32_t cfsize; i2p::config::GetOption("limits.coresize", cfsize);
if (cfsize) // core file size set
@ -134,14 +134,14 @@ namespace i2p
if (cfsize <= limit.rlim_max) {
limit.rlim_cur = cfsize;
if (setrlimit(RLIMIT_CORE, &limit) != 0) {
LogPrint(eLogCritical, "Daemon: Can't set max size of coredump: ", strerror(errno));
LogPrint(eLogError, "Daemon: Can't set max size of coredump: ", strerror(errno));
} else if (cfsize == 0) {
LogPrint(eLogInfo, "Daemon: coredumps disabled");
} else {
LogPrint(eLogInfo, "Daemon: Set max size of core files to ", cfsize / 1024, "Kb");
}
} else {
LogPrint(eLogCritical, "Daemon: limits.coresize exceeds system limit: ", limit.rlim_max);
LogPrint(eLogError, "Daemon: limits.coresize exceeds system limit: ", limit.rlim_max);
}
}
@ -155,7 +155,7 @@ namespace i2p
pidFH = open(pidfile.c_str(), O_RDWR | O_CREAT, 0600);
if (pidFH < 0)
{
LogPrint(eLogCritical, "Daemon: Could not create pid file ", pidfile, ": ", strerror(errno));
LogPrint(eLogError, "Daemon: Could not create pid file ", pidfile, ": ", strerror(errno));
std::cerr << "i2pd: Could not create pid file " << pidfile << ": " << strerror(errno) << std::endl;
return false;
}
@ -163,7 +163,7 @@ namespace i2p
#ifndef ANDROID
if (lockf(pidFH, F_TLOCK, 0) != 0)
{
LogPrint(eLogCritical, "Daemon: Could not lock pid file ", pidfile, ": ", strerror(errno));
LogPrint(eLogError, "Daemon: Could not lock pid file ", pidfile, ": ", strerror(errno));
std::cerr << "i2pd: Could not lock pid file " << pidfile << ": " << strerror(errno) << std::endl;
return false;
}

@ -259,7 +259,7 @@ namespace data
publicKeyLength = i2p::crypto::EDDSA25519_PUBLIC_KEY_LENGTH;
break;
default:
LogPrint (eLogCritical, "Blinding: Can't blind signature type ", (int)m_SigType);
LogPrint (eLogError, "Blinding: Can't blind signature type ", (int)m_SigType);
}
return publicKeyLength;
}
@ -289,7 +289,7 @@ namespace data
break;
}
default:
LogPrint (eLogCritical, "Blinding: Can't blind signature type ", (int)m_SigType);
LogPrint (eLogError, "Blinding: Can't blind signature type ", (int)m_SigType);
}
return publicKeyLength;
}

@ -108,7 +108,7 @@ namespace client
if (authType >= i2p::data::ENCRYPTED_LEASESET_AUTH_TYPE_NONE && authType <= i2p::data::ENCRYPTED_LEASESET_AUTH_TYPE_PSK)
m_AuthType = authType;
else
LogPrint (eLogCritical, "Destination: Unknown auth type ", authType);
LogPrint (eLogCritical, "Destination: Unknown auth type: ", authType);
}
}
it = params->find (I2CP_PARAM_LEASESET_PRIV_KEY);
@ -117,7 +117,7 @@ namespace client
m_LeaseSetPrivKey.reset (new i2p::data::Tag<32>());
if (m_LeaseSetPrivKey->FromBase64 (it->second) != 32)
{
LogPrint(eLogCritical, "Destination: Invalid value i2cp.leaseSetPrivKey ", it->second);
LogPrint(eLogCritical, "Destination: Invalid value i2cp.leaseSetPrivKey: ", it->second);
m_LeaseSetPrivKey.reset (nullptr);
}
}
@ -125,7 +125,7 @@ namespace client
}
catch (std::exception & ex)
{
LogPrint(eLogCritical, "Destination: Unable to parse parameters for destination: ", ex.what());
LogPrint(eLogError, "Destination: Unable to parse parameters for destination: ", ex.what());
}
SetNumTags (numTags);
m_Pool = i2p::tunnel::tunnels.CreateTunnelPool (inLen, outLen, inQty, outQty, inVar, outVar);
@ -1014,12 +1014,12 @@ namespace client
else if (authType == i2p::data::ENCRYPTED_LEASESET_AUTH_TYPE_PSK)
ReadAuthKey (I2CP_PARAM_LEASESET_CLIENT_PSK, params);
else
LogPrint (eLogCritical, "Destination: Unexpected auth type ", authType);
LogPrint (eLogCritical, "Destination: Unexpected auth type: ", authType);
if (m_AuthKeys->size ())
LogPrint (eLogInfo, "Destination: ", m_AuthKeys->size (), " auth keys read");
else
{
LogPrint (eLogCritical, "Destination: No auth keys read for auth type ", authType);
LogPrint (eLogCritical, "Destination: No auth keys read for auth type: ", authType);
m_AuthKeys = nullptr;
}
}
@ -1413,7 +1413,7 @@ namespace client
if (pubKey.FromBase64 (it.second.substr (pos+1)))
m_AuthKeys->push_back (pubKey);
else
LogPrint (eLogCritical, "Destination: Unexpected auth key ", it.second.substr (pos+1));
LogPrint (eLogCritical, "Destination: Unexpected auth key: ", it.second.substr (pos+1));
}
}
}

@ -77,14 +77,14 @@ namespace data
verifier->SetPublicKey (signingKey);
}
else
LogPrint (eLogCritical, "Family: elliptic curve ", curve, " is not supported");
LogPrint (eLogError, "Family: elliptic curve ", curve, " is not supported");
}
EC_KEY_free (ecKey);
}
break;
}
default:
LogPrint (eLogCritical, "Family: Certificate key type ", keyType, " is not supported");
LogPrint (eLogError, "Family: Certificate key type ", keyType, " is not supported");
}
EVP_PKEY_free (pkey);
if (verifier && cn)
@ -93,7 +93,7 @@ namespace data
SSL_free (ssl);
}
else
LogPrint (eLogCritical, "Family: Can't open certificate file ", filename);
LogPrint (eLogError, "Family: Can't open certificate file ", filename);
SSL_CTX_free (ctx);
}
@ -185,13 +185,13 @@ namespace data
delete[] b64;
}
else
LogPrint (eLogCritical, "Family: elliptic curve ", curve, " is not supported");
LogPrint (eLogError, "Family: elliptic curve ", curve, " is not supported");
}
}
SSL_free (ssl);
}
else
LogPrint (eLogCritical, "Family: Can't open keys file: ", filename);
LogPrint (eLogError, "Family: Can't open keys file: ", filename);
SSL_CTX_free (ctx);
return sig;
}

@ -755,7 +755,7 @@ namespace data
i2p::crypto::CreateECIESX25519AEADRatchetRandomKeys (priv, pub);
break;
default:
LogPrint (eLogCritical, "Identity: Crypto key type ", (int)type, " is not supported");
LogPrint (eLogError, "Identity: Crypto key type ", (int)type, " is not supported");
}
}

@ -633,7 +633,7 @@ namespace client
ins.first->second->Start ();
}
ins.first->second->isUpdated = true;
LogPrint(eLogCritical, "Clients: I2P Client forward for endpoint ", end, " already exists");
LogPrint(eLogError, "Clients: I2P Client forward for endpoint ", end, " already exists");
}
} else {
@ -785,7 +785,7 @@ namespace client
else
{
ins.first->second->isUpdated = true;
LogPrint(eLogCritical, "Clients: I2P Server Forward for destination/port ", m_AddressBook.ToAddress(localDestination->GetIdentHash()), "/", port, " already exists");
LogPrint(eLogError, "Clients: I2P Server Forward for destination/port ", m_AddressBook.ToAddress(localDestination->GetIdentHash()), "/", port, " already exists");
}
continue;

Loading…
Cancel
Save