mirror of https://gitee.com/bigwinds/arangodb
set log level as soon as possible
This commit is contained in:
parent
b50e0cba84
commit
56536adb96
|
@ -398,6 +398,8 @@ bool ApplicationServer::parse (int argc,
|
|||
TRI_EXIT_FUNCTION(EXIT_SUCCESS, NULL);
|
||||
}
|
||||
|
||||
TRI_SetLogLevelLogging(_logLevel.c_str());
|
||||
|
||||
// .............................................................................
|
||||
// parse phase 1
|
||||
// .............................................................................
|
||||
|
@ -881,7 +883,7 @@ bool ApplicationServer::readConfigurationFile () {
|
|||
|
||||
// do not use init files
|
||||
if (StringUtils::tolower(_configFile) == string("none")) {
|
||||
LOG_DEBUG("using no init file at all");
|
||||
LOG_INFO("using no init file at all");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -55,8 +55,7 @@
|
|||
// -----------------------------------------------------------------------------
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @addtogroup Logging
|
||||
/// @{
|
||||
/// @brief log appenders type
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
typedef enum {
|
||||
|
@ -82,19 +81,10 @@ typedef struct TRI_log_appender_s {
|
|||
}
|
||||
TRI_log_appender_t;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @}
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- private variables
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @addtogroup Logging
|
||||
/// @{
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief already initialised
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -255,7 +245,7 @@ static sig_atomic_t IsWarning = 1;
|
|||
/// @brief log info messages
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static sig_atomic_t IsInfo = 0;
|
||||
static sig_atomic_t IsInfo = 1;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief log debug messages
|
||||
|
@ -329,19 +319,10 @@ static bool UseFileBasedLogging = false;
|
|||
|
||||
static bool FilesToLog [FilesToLogSize];
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @}
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- private types
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @addtogroup Logging
|
||||
/// @{
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief message
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -354,19 +335,10 @@ typedef struct log_message_s {
|
|||
}
|
||||
log_message_t;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @}
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- private functions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @addtogroup Logging
|
||||
/// @{
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief stores output in a buffer
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -951,19 +923,10 @@ void CLEANUP_LOGGING_AND_EXIT_ON_FATAL_ERROR () {
|
|||
TRI_EXIT_FUNCTION(EXIT_FAILURE, NULL);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @}
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- public functions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @addtogroup Logging
|
||||
/// @{
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief gets the log level
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -1383,10 +1346,6 @@ void TRI_FreeBufferLogging (TRI_vector_t* buffer) {
|
|||
TRI_FreeVector(TRI_UNKNOWN_MEM_ZONE, buffer);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @}
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- LOG FILE APPENDER
|
||||
// -----------------------------------------------------------------------------
|
||||
|
@ -1395,11 +1354,6 @@ void TRI_FreeBufferLogging (TRI_vector_t* buffer) {
|
|||
// --SECTION-- private types
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @addtogroup Logging
|
||||
/// @{
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief structure for file log appenders
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -1414,19 +1368,10 @@ typedef struct log_appender_file_s {
|
|||
}
|
||||
log_appender_file_t;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @}
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- private functions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @addtogroup Logging
|
||||
/// @{
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief writes to a log file
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -1614,19 +1559,10 @@ static char* LogAppenderFile_Details (TRI_log_appender_t* appender) {
|
|||
return NULL;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @}
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- constructors and destructors
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @addtogroup Logging
|
||||
/// @{
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief creates a log appender for file output
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -1721,10 +1657,6 @@ TRI_log_appender_t* TRI_CreateLogAppenderFile (char const* filename,
|
|||
return &appender->base;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @}
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- SYSLOG APPENDER
|
||||
// -----------------------------------------------------------------------------
|
||||
|
@ -1733,11 +1665,6 @@ TRI_log_appender_t* TRI_CreateLogAppenderFile (char const* filename,
|
|||
// --SECTION-- private types
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @addtogroup Logging
|
||||
/// @{
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief structure for syslog appenders
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -1752,19 +1679,10 @@ log_appender_syslog_t;
|
|||
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @}
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- private functions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @addtogroup Logging
|
||||
/// @{
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief logs a message to a syslog appender
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -1857,19 +1775,10 @@ static char* LogAppenderSyslog_Details (TRI_log_appender_t* appender) {
|
|||
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @}
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- constructors and destructors
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @addtogroup Logging
|
||||
/// @{
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief creates a syslog appender
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -1956,10 +1865,6 @@ TRI_log_appender_t* TRI_CreateLogAppenderSyslog (char const* name,
|
|||
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @}
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- MODULE
|
||||
// -----------------------------------------------------------------------------
|
||||
|
@ -1968,11 +1873,6 @@ TRI_log_appender_t* TRI_CreateLogAppenderSyslog (char const* name,
|
|||
// --SECTION-- public functions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @addtogroup Logging
|
||||
/// @{
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief return global log file name
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -2122,10 +2022,6 @@ void TRI_ReopenLogging () {
|
|||
TRI_UnlockSpin(&AppendersLock);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @}
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- END-OF-FILE
|
||||
// -----------------------------------------------------------------------------
|
||||
|
|
|
@ -44,11 +44,6 @@ extern "C" {
|
|||
// --SECTION-- public types
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @addtogroup Logging
|
||||
/// @{
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief log levels
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -119,19 +114,10 @@ typedef struct TRI_log_buffer_s {
|
|||
}
|
||||
TRI_log_buffer_t;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @}
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- public functions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @addtogroup Logging
|
||||
/// @{
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief gets the log level
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -285,19 +271,10 @@ TRI_vector_t* TRI_BufferLogging (TRI_log_level_e, uint64_t pos, bool useUpto);
|
|||
|
||||
void TRI_FreeBufferLogging (TRI_vector_t* buffer);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @}
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- public macros
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @addtogroup Logging
|
||||
/// @{
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief macro that validates printf() style call arguments
|
||||
/// the printf() call contained will never be executed but is just there to
|
||||
|
@ -470,10 +447,6 @@ void CLEANUP_LOGGING_AND_EXIT_ON_FATAL_ERROR (void);
|
|||
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @}
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- LOG APPENDER
|
||||
// -----------------------------------------------------------------------------
|
||||
|
@ -482,30 +455,16 @@ void CLEANUP_LOGGING_AND_EXIT_ON_FATAL_ERROR (void);
|
|||
// --SECTION-- private types
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @addtogroup Logging
|
||||
/// @{
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief base structure for log appenders
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
struct TRI_log_appender_s;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @}
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- constructors and destructors
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @addtogroup Logging
|
||||
/// @{
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief creates a log append for file output
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -527,10 +486,6 @@ struct TRI_log_appender_s* TRI_CreateLogAppenderSyslog (char const*,
|
|||
bool);
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @}
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- MODULE
|
||||
// -----------------------------------------------------------------------------
|
||||
|
@ -539,11 +494,6 @@ struct TRI_log_appender_s* TRI_CreateLogAppenderSyslog (char const*,
|
|||
// --SECTION-- public functions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @addtogroup Logging
|
||||
/// @{
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief return global log file name
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -574,10 +524,6 @@ bool TRI_ShutdownLogging (bool);
|
|||
|
||||
void TRI_ReopenLogging (void);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @}
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue