suppressed spammy trace events

This commit is contained in:
Evan Tschannen 2018-08-06 12:12:55 -07:00
parent 5f7253928f
commit 6f328d41ac
3 changed files with 10 additions and 10 deletions

View File

@ -172,7 +172,7 @@ TLSNetworkConnections::TLSNetworkConnections( Reference<TLSOptions> options ) :
Future<Reference<IConnection>> TLSNetworkConnections::connect( NetworkAddress toAddr, std::string host) {
if ( toAddr.isTLS() ) {
NetworkAddress clearAddr( toAddr.ip, toAddr.port, toAddr.isPublic(), false );
TraceEvent("TLSConnectionConnecting").detail("ToAddr", toAddr);
TraceEvent("TLSConnectionConnecting").suppressFor(1.0).detail("ToAddr", toAddr);
if (host.empty() || host == toIPString(toAddr.ip))
return wrap(options->get_policy(TLSOptions::POLICY_VERIFY_PEERS), true, network->connect(clearAddr), std::string(""));
else
@ -199,10 +199,10 @@ Reference<IListener> TLSNetworkConnections::listen( NetworkAddress localAddr ) {
void TLSOptions::set_cert_file( std::string const& cert_file ) {
try {
TraceEvent("TLSConnectionSettingCertFile").detail("CertFilePath", cert_file);
TraceEvent("TLSConnectionSettingCertFile").suppressFor(1.0).detail("CertFilePath", cert_file);
set_cert_data( readFileBytes( cert_file, CERT_FILE_MAX_SIZE ) );
} catch ( Error& ) {
TraceEvent(SevError, "TLSOptionsSetCertFileError").detail("Filename", cert_file);
TraceEvent(SevError, "TLSOptionsSetCertFileError").suppressFor(1.0).detail("Filename", cert_file);
throw;
}
}
@ -345,12 +345,12 @@ Reference<ITLSPolicy> TLSOptions::get_policy(PolicyType type) {
void TLSOptions::init_plugin() {
TraceEvent("TLSConnectionLoadingPlugin").detail("Plugin", tlsPluginName);
TraceEvent("TLSConnectionLoadingPlugin").suppressFor(1.0).detail("Plugin", tlsPluginName);
plugin = loadPlugin<ITLSPlugin>( tlsPluginName );
if ( !plugin ) {
TraceEvent(SevError, "TLSConnectionPluginInitError").detail("Plugin", tlsPluginName).GetLastError();
TraceEvent(SevError, "TLSConnectionPluginInitError").suppressFor(1.0).detail("Plugin", tlsPluginName).GetLastError();
throw tls_error();
}

View File

@ -72,7 +72,7 @@ struct StorageMetricSample {
}
// If we didn't return above, we didn't find anything.
TraceEvent(SevWarnAlways, "CannotSplitLastSampleKey").detail("Range", printable(range)).detail("Offset", offset);
TraceEvent(SevWarn, "CannotSplitLastSampleKey").detail("Range", printable(range)).detail("Offset", offset);
return front ? range.end : range.begin;
}
};

View File

@ -2458,12 +2458,12 @@ void* loadLibrary(const char* lib_path) {
#if defined(__unixish__)
dlobj = dlopen( lib_path, RTLD_LAZY | RTLD_LOCAL );
if(dlobj == NULL) {
TraceEvent(SevWarn, "LoadLibraryFailed").detail("Library", lib_path).detail("Error", dlerror());
TraceEvent(SevWarn, "LoadLibraryFailed").suppressFor(1.0).detail("Library", lib_path).detail("Error", dlerror());
}
#else
dlobj = LoadLibrary( lib_path );
if(dlobj == NULL) {
TraceEvent(SevWarn, "LoadLibraryFailed").detail("Library", lib_path).GetLastError();
TraceEvent(SevWarn, "LoadLibraryFailed").suppressFor(1.0).detail("Library", lib_path).GetLastError();
}
#endif
@ -2476,12 +2476,12 @@ void* loadFunction(void* lib, const char* func_name) {
#if defined(__unixish__)
dlfcn = dlsym( lib, func_name );
if(dlfcn == NULL) {
TraceEvent(SevWarn, "LoadFunctionFailed").detail("Function", func_name).detail("Error", dlerror());
TraceEvent(SevWarn, "LoadFunctionFailed").suppressFor(1.0).detail("Function", func_name).detail("Error", dlerror());
}
#else
dlfcn = GetProcAddress( (HINSTANCE)lib, func_name );
if(dlfcn == NULL) {
TraceEvent(SevWarn, "LoadFunctionFailed").detail("Function", func_name).GetLastError();
TraceEvent(SevWarn, "LoadFunctionFailed").suppressFor(1.0).detail("Function", func_name).GetLastError();
}
#endif