File tree 3 files changed +6
-6
lines changed
3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -162,7 +162,7 @@ void DiscoveryBpf::attachOpenSSLProbes() {
162
162
auto isAttached =
163
163
std::any_of (libNames.begin (), libNames.end (), [this ](const auto & libName) { return tryAttachOpenSSLProbesToLibName (libName); });
164
164
if (!isAttached) {
165
- throw std::runtime_error (" Couldn't attach OpenSSL probes to any of the libraries" );
165
+ LOG_ERROR (" Couldn't attach OpenSSL probes to any of the libraries" );
166
166
}
167
167
}
168
168
Original file line number Diff line number Diff line change @@ -221,9 +221,9 @@ struct DiscoveryGlobalState {
221
221
*/
222
222
223
223
enum DiscoveryLogLevel {
224
- DISCOVERY_LOG_LEVEL_TRACE,
225
- DISCOVERY_LOG_LEVEL_DEBUG,
226
- DISCOVERY_LOG_LEVEL_OFF,
224
+ DISCOVERY_LOG_LEVEL_TRACE = 1 ,
225
+ DISCOVERY_LOG_LEVEL_DEBUG = 2 ,
226
+ DISCOVERY_LOG_LEVEL_OFF = 3 ,
227
227
};
228
228
229
229
struct DiscoveryConfig {
Original file line number Diff line number Diff line change @@ -42,9 +42,9 @@ __attribute__((always_inline)) inline static int sendDiscoveryLogEvent(struct pt
42
42
__attribute__((always_inline )) inline static enum DiscoveryLogLevel getDiscoveryLogLevel () {
43
43
const struct DiscoveryConfig * configPtr = getDiscoveryConfig ();
44
44
if (configPtr == NULL ) {
45
- return 0 ;
45
+ return DISCOVERY_LOG_LEVEL_OFF ;
46
46
}
47
- return configPtr -> logLevel ;
47
+ return ( configPtr -> logLevel > 0 ) ? configPtr -> logLevel : DISCOVERY_LOG_LEVEL_OFF ;
48
48
}
49
49
50
50
__attribute__((always_inline )) inline static int discoveryLog (
You can’t perform that action at this time.
0 commit comments