Turn graylog back

This commit is contained in:
tokslaw7
2023-04-18 11:52:48 +00:00
parent 2dde3b2417
commit ebe38c9e3f
2 changed files with 3 additions and 7 deletions
+2 -2
View File
@@ -49,7 +49,7 @@ void logfmt( TLogLevel level, const char * format, ... ) {
("pid", getpid())
("loglevel", FILELog::ToString(level).c_str());
} else {
//FILE_LOG(logERROR) << "graylog is null!" ;
FILE_LOG(logERROR) << "graylog is null!" ;
}
} else {
FILE_LOG(logERROR) << "buffer length is " << strlen(buffer) ;
@@ -77,7 +77,7 @@ void logfmt( TLogLevel level, const char * format, ... ) {
void GraylogStream(TLogLevel level, std::string raw) {
if (!graylog) {
//std::cerr << "graylog is null!"; // We cannot use log here as it will go recursive
std::cerr << "graylog is null!"; // We cannot use log here as it will go recursive
return; // Not initialized, yet?
}
if (!raw.empty()) {
+1 -5
View File
@@ -41,7 +41,7 @@ WrenchBoard::WrenchBoard() {
long logPort = CfgReadLong("logger.port");
// Instantiate remote logger (GELF)
/*graylog = new gelfcpp::output::GelfUDPOutput(logHost, logPort);
graylog = new gelfcpp::output::GelfUDPOutput(logHost, logPort);
std::string msg = "Instantiate remote logger (GELF)";
GELF_MESSAGE(*graylog)(decorator)
(msg.c_str())
@@ -106,7 +106,6 @@ void WrenchBoard::logMessage(const char *message) {
const char* query_string = std::getenv( "QUERY_STRING" );
// const char* http_x_ff = std::getenv( "HTTP_X_FORWARDED_FOR" );
/*
GELF_MESSAGE(*graylog)(decorator)
("Environment variables")
("pid", getpid())
@@ -116,7 +115,6 @@ void WrenchBoard::logMessage(const char *message) {
/* ("HTTP_COOKIE", http_cookie) /
("QUERY_STRING", query_string);
// ("HTTP_X_FORWARDED_FOR", http_x_ff);
//*/
}
/*
SET_ENV( "REMOTE_ADDR" );
@@ -139,10 +137,8 @@ WrenchBoard::~WrenchBoard() {
} // */
}
// clean-up GELF
/*
if (graylog) {
delete graylog;
}
//*/
}