mirror of https://gitee.com/bigwinds/arangodb
adjusted startup output to be more compact, less verbose
This commit is contained in:
parent
8f48edb6d6
commit
0fb397eabd
|
@ -1,6 +1,8 @@
|
|||
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.
|
||||
On server start, this number is enforced on systems that have rlimit. If the limit
|
||||
cannot be enforced, starting the server will fail.
|
||||
|
|
|
@ -383,7 +383,8 @@ void ArangoServer::buildApplicationServer () {
|
|||
"arangodb",
|
||||
TRI_CheckAuthenticationAuthInfo);
|
||||
_applicationServer->addFeature(_applicationEndpointServer);
|
||||
|
||||
|
||||
|
||||
// .............................................................................
|
||||
// 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();
|
||||
}
|
||||
|
||||
// .............................................................................
|
||||
// set language of default collator
|
||||
// .............................................................................
|
||||
|
||||
|
||||
UVersionInfo icuVersion;
|
||||
char icuVersionString[U_MAX_VERSION_STRING_LENGTH];
|
||||
u_getVersion(icuVersion);
|
||||
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);
|
||||
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 {
|
||||
LOGGER_INFO("using default language '" << Utf8Helper::DefaultUtf8Helper.getCollatorLanguage() << "'" );
|
||||
languageName = Utf8Helper::DefaultUtf8Helper.getCollatorLanguage();
|
||||
//LOGGER_INFO("using default language '" << Utf8Helper::DefaultUtf8Helper.getCollatorLanguage() << "'" );
|
||||
}
|
||||
|
||||
|
||||
// .............................................................................
|
||||
// init nonces
|
||||
// .............................................................................
|
||||
|
||||
uint32_t optionNonceHashSize = 0; // TODO: add an server option
|
||||
uint32_t optionNonceHashSize = 0; // TODO: add a server option
|
||||
if (optionNonceHashSize > 0) {
|
||||
LOGGER_INFO("setting nonce hash size to '" << optionNonceHashSize << "'" );
|
||||
LOGGER_DEBUG("setting nonce hash size to '" << optionNonceHashSize << "'" );
|
||||
Nonce::create(optionNonceHashSize);
|
||||
}
|
||||
|
||||
|
@ -455,6 +469,8 @@ void ArangoServer::buildApplicationServer () {
|
|||
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());
|
||||
|
||||
if (mode == OperationMode::MODE_CONSOLE ||
|
||||
|
@ -594,8 +610,7 @@ int ArangoServer::startupServer () {
|
|||
|
||||
_applicationServer->start();
|
||||
|
||||
LOGGER_INFO("ArangoDB (version " << TRIAGENS_VERSION << ") is ready for business");
|
||||
LOGGER_INFO("Have Fun!");
|
||||
LOGGER_INFO("ArangoDB (version " << TRIAGENS_VERSION << ") is ready for business. Have fun!");
|
||||
|
||||
_applicationServer->wait();
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
|
||||
#include "Basics/ConditionLocker.h"
|
||||
#include "Basics/ReadLocker.h"
|
||||
#include "Basics/StringUtils.h"
|
||||
#include "Basics/WriteLocker.h"
|
||||
#include "Logger/Logger.h"
|
||||
#include "V8/v8-conv.h"
|
||||
|
@ -523,45 +524,43 @@ void ApplicationV8::setupOptions (map<string, basics::ProgramOptionsDescription>
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
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
|
||||
if (_startupModules.empty()) {
|
||||
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
|
||||
if (_startupPath.empty()) {
|
||||
LOGGER_FATAL_AND_EXIT("no 'javascript.startup-directory' has been supplied, giving up");
|
||||
}
|
||||
else {
|
||||
LOGGER_INFO("using JavaScript startup files at '" << _startupPath << "'");
|
||||
_startupLoader.setDirectory(_startupPath);
|
||||
|
||||
// set the actions path
|
||||
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
|
||||
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
|
||||
|
@ -569,6 +568,11 @@ bool ApplicationV8::prepare () {
|
|||
LOGGER_INFO("using V8 options '" << _v8Options << "'");
|
||||
v8::V8::SetFlagsFromString(_v8Options.c_str(), _v8Options.size());
|
||||
}
|
||||
|
||||
// use a minimum of 1 second for GC
|
||||
if (_gcFrequency < 1) {
|
||||
_gcFrequency = 1;
|
||||
}
|
||||
|
||||
// setup instances
|
||||
_contexts = new V8Context*[_nrInstances];
|
||||
|
|
|
@ -216,7 +216,7 @@ void ApplicationAdminServer::addHandlers (HttpHandlerFactory* factory, string co
|
|||
// .............................................................................
|
||||
|
||||
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)->contentType = "text/plain";
|
||||
|
|
|
@ -980,7 +980,7 @@ bool ApplicationServer::readConfigurationFile () {
|
|||
}
|
||||
else {
|
||||
|
||||
LOGGER_INFO("no user init file '" << homeDir << "' found");
|
||||
LOGGER_DEBUG("no user init file '" << homeDir << "' found");
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -138,6 +138,14 @@ ApplicationEndpointServer::~ApplicationEndpointServer () {
|
|||
/// @addtogroup Scheduler
|
||||
/// @{
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief return the SSL engine version number
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
std::string ApplicationEndpointServer::getSslVersion () {
|
||||
return OPENSSL_VERSION_TEXT;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief builds the endpoint servers
|
||||
|
@ -277,9 +285,6 @@ bool ApplicationEndpointServer::parsePhase2 (ProgramOptions& options) {
|
|||
}
|
||||
}
|
||||
|
||||
// dump used endpoints for user information
|
||||
_endpointList.dump();
|
||||
|
||||
// and return
|
||||
return true;
|
||||
}
|
||||
|
@ -289,6 +294,9 @@ bool ApplicationEndpointServer::parsePhase2 (ProgramOptions& options) {
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
bool ApplicationEndpointServer::prepare () {
|
||||
// dump used endpoints for user information
|
||||
_endpointList.dump();
|
||||
|
||||
_handlerFactory = new HttpHandlerFactory(_authenticationRealm, _checkAuthentication);
|
||||
|
||||
return true;
|
||||
|
@ -375,8 +383,6 @@ void ApplicationEndpointServer::stop () {
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
bool ApplicationEndpointServer::createSslContext () {
|
||||
LOGGER_INFO("using " << OPENSSL_VERSION_TEXT);
|
||||
|
||||
// check keyfile
|
||||
if (_httpsKeyfile.empty()) {
|
||||
return true;
|
||||
|
@ -389,7 +395,7 @@ bool ApplicationEndpointServer::createSslContext () {
|
|||
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
|
||||
_sslContext = HttpsServer::sslContext(HttpsServer::protocol_e(_sslProtocol), _httpsKeyfile);
|
||||
|
@ -402,7 +408,7 @@ bool ApplicationEndpointServer::createSslContext () {
|
|||
// set cache mode
|
||||
SSL_CTX_set_session_cache_mode(_sslContext, _sslCache ? SSL_SESS_CACHE_SERVER : SSL_SESS_CACHE_OFF);
|
||||
if (_sslCache) {
|
||||
LOGGER_INFO("using SSL session caching");
|
||||
LOGGER_TRACE("using SSL session caching");
|
||||
}
|
||||
|
||||
// set options
|
||||
|
|
|
@ -109,6 +109,13 @@ namespace triagens {
|
|||
|
||||
public:
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief return the SSL engine version number
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static std::string getSslVersion ();
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief builds the servers
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Reference in New Issue