1
0
Fork 0

adjusted startup output to be more compact, less verbose

This commit is contained in:
Jan Steemann 2013-03-06 19:05:17 +01:00
parent 8f48edb6d6
commit 0fb397eabd
7 changed files with 80 additions and 46 deletions

View File

@ -1,6 +1,8 @@
v1.3 (XXXX-XX-XX) v1.3 (XXXX-XX-XX)
----------------- -----------------
* adjust startup log output to be more compact, less verbose
* set the required minimum number of file descriptors to 256. * set the required minimum number of file descriptors to 256.
On server start, this number is enforced on systems that have rlimit. If the limit On server start, this number is enforced on systems that have rlimit. If the limit
cannot be enforced, starting the server will fail. cannot be enforced, starting the server will fail.

View File

@ -384,6 +384,7 @@ void ArangoServer::buildApplicationServer () {
TRI_CheckAuthenticationAuthInfo); TRI_CheckAuthenticationAuthInfo);
_applicationServer->addFeature(_applicationEndpointServer); _applicationServer->addFeature(_applicationEndpointServer);
// ............................................................................. // .............................................................................
// parse the command line options - exit if there is a parse error // parse the command line options - exit if there is a parse error
// ............................................................................. // .............................................................................
@ -392,31 +393,44 @@ void ArangoServer::buildApplicationServer () {
CLEANUP_LOGGING_AND_EXIT_ON_FATAL_ERROR(); CLEANUP_LOGGING_AND_EXIT_ON_FATAL_ERROR();
} }
// .............................................................................
// set language of default collator
// .............................................................................
UVersionInfo icuVersion; UVersionInfo icuVersion;
char icuVersionString[U_MAX_VERSION_STRING_LENGTH]; char icuVersionString[U_MAX_VERSION_STRING_LENGTH];
u_getVersion(icuVersion); u_getVersion(icuVersion);
u_versionToString(icuVersion, icuVersionString); u_versionToString(icuVersion, icuVersionString);
LOGGER_INFO("using ICU " << icuVersionString);
// dump versions of important components
LOGGER_INFO("ArangoDB " << TRIAGENS_VERSION << " -- " <<
"ICU " << icuVersionString << ", " <<
"V8 version " << v8::V8::GetVersion() << ", "
"SSL engine " << ApplicationEndpointServer::getSslVersion());
// .............................................................................
// set language of default collator
// .............................................................................
string languageName;
Utf8Helper::DefaultUtf8Helper.setCollatorLanguage(_defaultLanguage); Utf8Helper::DefaultUtf8Helper.setCollatorLanguage(_defaultLanguage);
if (Utf8Helper::DefaultUtf8Helper.getCollatorCountry() != "") { if (Utf8Helper::DefaultUtf8Helper.getCollatorCountry() != "") {
LOGGER_INFO("using default language '" << Utf8Helper::DefaultUtf8Helper.getCollatorLanguage() << "_" << Utf8Helper::DefaultUtf8Helper.getCollatorCountry() << "'"); languageName = string(Utf8Helper::DefaultUtf8Helper.getCollatorLanguage() + "_" + Utf8Helper::DefaultUtf8Helper.getCollatorCountry());
// LOGGER_INFO("using default language '" << Utf8Helper::DefaultUtf8Helper.getCollatorLanguage() << "_" << Utf8Helper::DefaultUtf8Helper.getCollatorCountry() << "'");
} }
else { else {
LOGGER_INFO("using default language '" << Utf8Helper::DefaultUtf8Helper.getCollatorLanguage() << "'" ); languageName = Utf8Helper::DefaultUtf8Helper.getCollatorLanguage();
//LOGGER_INFO("using default language '" << Utf8Helper::DefaultUtf8Helper.getCollatorLanguage() << "'" );
} }
// ............................................................................. // .............................................................................
// init nonces // init nonces
// ............................................................................. // .............................................................................
uint32_t optionNonceHashSize = 0; // TODO: add an server option uint32_t optionNonceHashSize = 0; // TODO: add a server option
if (optionNonceHashSize > 0) { if (optionNonceHashSize > 0) {
LOGGER_INFO("setting nonce hash size to '" << optionNonceHashSize << "'" ); LOGGER_DEBUG("setting nonce hash size to '" << optionNonceHashSize << "'" );
Nonce::create(optionNonceHashSize); Nonce::create(optionNonceHashSize);
} }
@ -455,6 +469,8 @@ void ArangoServer::buildApplicationServer () {
LOGGER_FATAL_AND_EXIT("no database path has been supplied, giving up"); LOGGER_FATAL_AND_EXIT("no database path has been supplied, giving up");
} }
LOGGER_INFO("using default language '" << languageName << "'");
OperationMode::server_operation_mode_e mode = OperationMode::determineMode(_applicationServer->programOptions()); OperationMode::server_operation_mode_e mode = OperationMode::determineMode(_applicationServer->programOptions());
if (mode == OperationMode::MODE_CONSOLE || if (mode == OperationMode::MODE_CONSOLE ||
@ -594,8 +610,7 @@ int ArangoServer::startupServer () {
_applicationServer->start(); _applicationServer->start();
LOGGER_INFO("ArangoDB (version " << TRIAGENS_VERSION << ") is ready for business"); LOGGER_INFO("ArangoDB (version " << TRIAGENS_VERSION << ") is ready for business. Have fun!");
LOGGER_INFO("Have Fun!");
_applicationServer->wait(); _applicationServer->wait();

View File

@ -29,6 +29,7 @@
#include "Basics/ConditionLocker.h" #include "Basics/ConditionLocker.h"
#include "Basics/ReadLocker.h" #include "Basics/ReadLocker.h"
#include "Basics/StringUtils.h"
#include "Basics/WriteLocker.h" #include "Basics/WriteLocker.h"
#include "Logger/Logger.h" #include "Logger/Logger.h"
#include "V8/v8-conv.h" #include "V8/v8-conv.h"
@ -523,46 +524,44 @@ void ApplicationV8::setupOptions (map<string, basics::ProgramOptionsDescription>
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
bool ApplicationV8::prepare () { bool ApplicationV8::prepare () {
LOGGER_DEBUG("V8 version: " << v8::V8::GetVersion());
// use a minimum of 1 second for GC
if (_gcFrequency < 1) {
_gcFrequency = 1;
}
// check the startup modules // check the startup modules
if (_startupModules.empty()) { if (_startupModules.empty()) {
LOGGER_FATAL_AND_EXIT("no 'javascript.modules-path' has been supplied, giving up"); LOGGER_FATAL_AND_EXIT("no 'javascript.modules-path' has been supplied, giving up");
} }
else {
LOGGER_INFO("using JavaScript modules path '" << _startupModules << "'");
}
if (! _startupNodeModules.empty()) {
LOGGER_INFO("using Node modules path '" << _startupNodeModules << "'");
}
// set up the startup loader // set up the startup loader
if (_startupPath.empty()) { if (_startupPath.empty()) {
LOGGER_FATAL_AND_EXIT("no 'javascript.startup-directory' has been supplied, giving up"); LOGGER_FATAL_AND_EXIT("no 'javascript.startup-directory' has been supplied, giving up");
} }
else {
LOGGER_INFO("using JavaScript startup files at '" << _startupPath << "'"); // set the actions path
_startupLoader.setDirectory(_startupPath); if (_useActions && _actionPath.empty()) {
LOGGER_FATAL_AND_EXIT("no 'javascript.action-directory' has been supplied, giving up");
} }
// dump paths
{
vector<string> paths;
paths.push_back(string("Javascript startup path '" + _startupPath + "'"));
paths.push_back(string("Javascript modules path '" + _startupModules + "'"));
if (! _startupNodeModules.empty()) {
paths.push_back(string("Node modules path '" + _startupNodeModules + "'"));
}
if (_useActions) {
paths.push_back(string("Javascript action path '" + _actionPath + "'"));
}
LOGGER_INFO("using " << StringUtils::join(paths, ", "));
}
_startupLoader.setDirectory(_startupPath);
// set up action loader // set up action loader
if (_useActions) { if (_useActions) {
if (_actionPath.empty()) {
LOGGER_FATAL_AND_EXIT("no 'javascript.action-directory' has been supplied, giving up");
}
else {
LOGGER_INFO("using JavaScript action files at '" << _actionPath << "'");
_actionLoader.setDirectory(_actionPath); _actionLoader.setDirectory(_actionPath);
} }
}
// add v8 options // add v8 options
if (_v8Options.size() > 0) { if (_v8Options.size() > 0) {
@ -570,6 +569,11 @@ bool ApplicationV8::prepare () {
v8::V8::SetFlagsFromString(_v8Options.c_str(), _v8Options.size()); v8::V8::SetFlagsFromString(_v8Options.c_str(), _v8Options.size());
} }
// use a minimum of 1 second for GC
if (_gcFrequency < 1) {
_gcFrequency = 1;
}
// setup instances // setup instances
_contexts = new V8Context*[_nrInstances]; _contexts = new V8Context*[_nrInstances];

View File

@ -216,7 +216,7 @@ void ApplicationAdminServer::addHandlers (HttpHandlerFactory* factory, string co
// ............................................................................. // .............................................................................
if (_allowAdminDirectory) { if (_allowAdminDirectory) {
LOGGER_INFO("using JavaScript front-end files stored at '" << _adminDirectory << "'"); LOGGER_DEBUG("using JavaScript front-end path '" << _adminDirectory << "'");
reinterpret_cast<PathHandler::Options*>(_pathOptions)->path = _adminDirectory; reinterpret_cast<PathHandler::Options*>(_pathOptions)->path = _adminDirectory;
reinterpret_cast<PathHandler::Options*>(_pathOptions)->contentType = "text/plain"; reinterpret_cast<PathHandler::Options*>(_pathOptions)->contentType = "text/plain";

View File

@ -980,7 +980,7 @@ bool ApplicationServer::readConfigurationFile () {
} }
else { else {
LOGGER_INFO("no user init file '" << homeDir << "' found"); LOGGER_DEBUG("no user init file '" << homeDir << "' found");
} }
} }

View File

@ -139,6 +139,14 @@ ApplicationEndpointServer::~ApplicationEndpointServer () {
/// @{ /// @{
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/// @brief return the SSL engine version number
////////////////////////////////////////////////////////////////////////////////
std::string ApplicationEndpointServer::getSslVersion () {
return OPENSSL_VERSION_TEXT;
}
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// @brief builds the endpoint servers /// @brief builds the endpoint servers
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
@ -277,9 +285,6 @@ bool ApplicationEndpointServer::parsePhase2 (ProgramOptions& options) {
} }
} }
// dump used endpoints for user information
_endpointList.dump();
// and return // and return
return true; return true;
} }
@ -289,6 +294,9 @@ bool ApplicationEndpointServer::parsePhase2 (ProgramOptions& options) {
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
bool ApplicationEndpointServer::prepare () { bool ApplicationEndpointServer::prepare () {
// dump used endpoints for user information
_endpointList.dump();
_handlerFactory = new HttpHandlerFactory(_authenticationRealm, _checkAuthentication); _handlerFactory = new HttpHandlerFactory(_authenticationRealm, _checkAuthentication);
return true; return true;
@ -375,8 +383,6 @@ void ApplicationEndpointServer::stop () {
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
bool ApplicationEndpointServer::createSslContext () { bool ApplicationEndpointServer::createSslContext () {
LOGGER_INFO("using " << OPENSSL_VERSION_TEXT);
// check keyfile // check keyfile
if (_httpsKeyfile.empty()) { if (_httpsKeyfile.empty()) {
return true; return true;
@ -389,7 +395,7 @@ bool ApplicationEndpointServer::createSslContext () {
return false; return false;
} }
LOGGER_INFO("using SSL protocol version '" << HttpsServer::protocolName((HttpsServer::protocol_e) _sslProtocol) << "'"); LOGGER_DEBUG("using SSL protocol version '" << HttpsServer::protocolName((HttpsServer::protocol_e) _sslProtocol) << "'");
// create context // create context
_sslContext = HttpsServer::sslContext(HttpsServer::protocol_e(_sslProtocol), _httpsKeyfile); _sslContext = HttpsServer::sslContext(HttpsServer::protocol_e(_sslProtocol), _httpsKeyfile);
@ -402,7 +408,7 @@ bool ApplicationEndpointServer::createSslContext () {
// set cache mode // set cache mode
SSL_CTX_set_session_cache_mode(_sslContext, _sslCache ? SSL_SESS_CACHE_SERVER : SSL_SESS_CACHE_OFF); SSL_CTX_set_session_cache_mode(_sslContext, _sslCache ? SSL_SESS_CACHE_SERVER : SSL_SESS_CACHE_OFF);
if (_sslCache) { if (_sslCache) {
LOGGER_INFO("using SSL session caching"); LOGGER_TRACE("using SSL session caching");
} }
// set options // set options

View File

@ -109,6 +109,13 @@ namespace triagens {
public: public:
////////////////////////////////////////////////////////////////////////////////
/// @brief return the SSL engine version number
////////////////////////////////////////////////////////////////////////////////
static std::string getSslVersion ();
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// @brief builds the servers /// @brief builds the servers
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////