1
0
Fork 0

Merge branch '1.1' of github.com:triAGENS/ArangoDB into 1.1

This commit is contained in:
Frank Celler 2012-11-27 13:28:57 +01:00
commit 4b17948240
8 changed files with 79 additions and 52 deletions

View File

@ -103,16 +103,6 @@ removed. Replacing will also create a new revision:
For more information, please check @ref RestDocument.
Blueprints API {#NewFeatures11BluePrintsAPI}
--------------------------------------------
Blueprints is a property graph model interface with provided
implementations. Databases that implement the Blueprints interfaces
automatically support Blueprints-enabled applications
(@EXTREF{http://tinkerpop.com/,http://tinkerpop.com}).
For more information please refer to @ref HttpBlueprints.
AQL Improvements {#NewFeatures11AqlImprovements}
------------------------------------------------

View File

@ -5,7 +5,6 @@ TOC {#NewFeatures11TOC}
- @ref NewFeatures11CollectionTypes
- @ref NewFeatures11BatchRequests
- @ref NewFeatures11PartialUpdates
- @ref NewFeatures11BluePrintsAPI
- @ref NewFeatures11AqlImprovements
- @ref NewFeatures11DiskSynchronisation
- @ref NewFeatures11ServerStatistics

View File

@ -137,7 +137,6 @@ following command line option:
Of course this option can also be stored in a configuration file.
### HTTP keep-alive
The following _arangod_ startup options have been removed in ArangoDB
@ -261,6 +260,15 @@ interactively prompt for a password. If no username is specified on
the command line, the default user _root_ will be used but there will
still be a password prompt.
Change of syslog usage
----------------------
In 1.0, arangod always logged its output to the syslog, regardless of
any other logging that was configured. In 1.1, this has changed. Log
messages will be sent to the syslog only if the server is started with
the `--log.syslog` option and a non-empty string (the log facility)
is given to it.
Removed functionality
---------------------

View File

@ -241,7 +241,7 @@ void ApplicationServer::setupLogging () {
TRI_SetFileToLog(i->c_str());
}
if (NULL == TRI_CreateLogAppenderFile(_logFile)) {
if (NULL == TRI_CreateLogAppenderFile(_logFile.c_str())) {
if (_logFile.length() > 0) {
// the user specified a log file to use but it could not be created. bail out
std::cerr << "failed to create logfile " << _logFile << std::endl;
@ -250,7 +250,9 @@ void ApplicationServer::setupLogging () {
}
}
#ifdef TRI_ENABLE_SYSLOG
TRI_CreateLogAppenderSyslog(_logPrefix, _logSyslog);
if (_logSyslog != "") {
TRI_CreateLogAppenderSyslog(_logPrefix.c_str(), _logSyslog.c_str());
}
#endif
}

View File

@ -1432,6 +1432,7 @@ TRI_log_appender_t* TRI_CreateLogAppenderFile (char const* filename) {
typedef struct log_appender_syslog_s {
TRI_log_appender_t base;
TRI_mutex_t _mutex;
}
log_appender_syslog_t;
@ -1462,6 +1463,7 @@ static void LogAppenderSyslog_Log (TRI_log_appender_t* appender,
char const* msg,
size_t length) {
int priority;
log_appender_syslog_t* self;
switch (severity) {
case TRI_LOG_SEVERITY_EXCEPTION: priority = LOG_CRIT; break;
@ -1481,8 +1483,12 @@ static void LogAppenderSyslog_Log (TRI_log_appender_t* appender,
case TRI_LOG_LEVEL_TRACE: priority = LOG_DEBUG; break;
}
}
self = (log_appender_syslog_t*) appender;
TRI_LockMutex(&self->_mutex);
syslog(priority, "%s", msg);
TRI_UnlockMutex(&self->_mutex);
}
#endif
@ -1518,9 +1524,14 @@ static void LogAppenderSyslog_Close (TRI_log_appender_t* appender) {
}
TRI_UnlockSpin(&AppendersLock);
self = (log_appender_syslog_t*) appender;
TRI_LockMutex(&self->_mutex);
closelog();
TRI_UnlockMutex(&self->_mutex);
TRI_DestroyMutex(&self->_mutex);
TRI_Free(TRI_CORE_MEM_ZONE, self);
}
@ -1549,9 +1560,12 @@ TRI_log_appender_t* TRI_CreateLogAppenderSyslog (char const* name, char const* f
log_appender_syslog_t* appender;
int value;
assert(facility);
assert(*facility != '\0');
// no logging
if (name == NULL || *name == '\0') {
name = "[voc]";
name = "[arangod]";
}
// allocate space
@ -1562,6 +1576,8 @@ TRI_log_appender_t* TRI_CreateLogAppenderSyslog (char const* name, char const* f
appender->base.reopen = LogAppenderSyslog_Reopen;
appender->base.close = LogAppenderSyslog_Close;
TRI_InitMutex(&appender->_mutex);
// find facility
value = LOG_LOCAL0;
@ -1582,7 +1598,9 @@ TRI_log_appender_t* TRI_CreateLogAppenderSyslog (char const* name, char const* f
}
// and open logging
TRI_LockMutex(&appender->_mutex);
openlog(name, LOG_CONS | LOG_PID, value);
TRI_UnlockMutex(&appender->_mutex);
// and store it
TRI_LockSpin(&AppendersLock);

View File

@ -85,26 +85,6 @@ void TRI_SetFileToLog (string const& file) {
TRI_SetFileToLog(file.c_str());
}
////////////////////////////////////////////////////////////////////////////////
/// @brief creates a log appender for file output
////////////////////////////////////////////////////////////////////////////////
TRI_log_appender_t* TRI_CreateLogAppenderFile (string const& filename) {
return TRI_CreateLogAppenderFile(filename.c_str());
}
////////////////////////////////////////////////////////////////////////////////
/// @brief creates a syslog appender
////////////////////////////////////////////////////////////////////////////////
#ifdef TRI_ENABLE_SYSLOG
TRI_log_appender_t* TRI_CreateLogAppenderSyslog (string const& name, string const& facility) {
return TRI_CreateLogAppenderSyslog(name.c_str(), facility.c_str());
}
#endif
////////////////////////////////////////////////////////////////////////////////
/// @}
////////////////////////////////////////////////////////////////////////////////

View File

@ -782,22 +782,6 @@ void TRI_SetPrefixLogging (std::string const& prefix);
void TRI_SetFileToLog (std::string const& file);
////////////////////////////////////////////////////////////////////////////////
/// @brief creates a log appender for file output
////////////////////////////////////////////////////////////////////////////////
TRI_log_appender_t* TRI_CreateLogAppenderFile (std::string const& filename);
////////////////////////////////////////////////////////////////////////////////
/// @brief creates a syslog appender
////////////////////////////////////////////////////////////////////////////////
#ifdef TRI_ENABLE_SYSLOG
TRI_log_appender_t* TRI_CreateLogAppenderSyslog (std::string const& name, std::string const& facility);
#endif
////////////////////////////////////////////////////////////////////////////////
/// @}
////////////////////////////////////////////////////////////////////////////////

View File

@ -8,6 +8,36 @@ MODULESPATH="@PKGDATADIR@/js/server/modules;@PKGDATADIR@/js/common/modules"
SCRIPT="@PKGDATADIR@/js/server/arango-upgrade.js"
UIDOPTION=""
UIDUSER=""
WHOAMI=$(whoami)
function print_help {
echo ""
echo "usage:"
echo " $0 --database.directory <path to directory> [options]"
echo ""
echo "options:"
echo " --uid <user> change user to <user> for upgrading"
echo " --help this message"
echo ""
echo "options for developers:"
echo " --relative use arangod and javascript in current directory"
echo ""
exit 1
}
function checkOptions {
case "$1" in
--help)
print_help
;;
*)
echo "unknown option: $1"
print_help
;;
esac
}
while [ "$#" -gt 1 ]; do
case "$1" in
@ -27,13 +57,23 @@ while [ "$#" -gt 1 ]; do
MODULESPATH="./js/server/modules;./js/common/modules"
SCRIPT="./js/server/arango-upgrade.js"
;;
*)
checkOptions $1
;;
esac
shift
done
if [ "$#" -gt 0 ]; then
checkOptions $1
fi
if test ! -d "$DATABASE"; then
echo "$0: database directory '$DATABASE' does not exist"
print_help
exit 1
fi
@ -44,3 +84,9 @@ $ARANGOD \
--javascript.modules-path "$MODULESPATH" \
$UIDOPTION $UIDUSER
if [ "$WHOAMI" == "abrandt" ] && [ "$UIDUSER" == "" ] ; then
echo "Warning:"
echo " $0 started without '--uid <user>' option."
echo " Change owner of database files if needed!"
exit 1
fi