Skip to content

Commit d5710e6

Browse files
committed
Add braces and udpdate readme
1 parent 5557df8 commit d5710e6

3 files changed

Lines changed: 8 additions & 5 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,5 +162,5 @@ To run the cipher suite testing:
162162

163163
## Debugging
164164

165-
To enable wolfProvider debug logging, build with `--debug`. If you want to filter logging a certain way, set `WOLFPROV_LOG_LEVEL_FILTER` and `WOLFPROV_LOG_COMPONENTS_FILTER` in `include/wolfprovider/wp_logging.h` as needed. See comments in that file for examples.
165+
To enable wolfProvider debug logging, build with `--debug` which enables exit messages, error messages, and informational messages. If you want to filter logging a certain way or increase detail level, set `WOLFPROV_LOG_LEVEL_FILTER` and `WOLFPROV_LOG_COMPONENTS_FILTER` in `include/wolfprovider/wp_logging.h` as needed. See comments in that file for examples.
166166

include/wolfprovider/wp_logging.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ void WOLFPROV_ERROR_FUNC_NULL_LINE(int type, const char* funcName,
262262
void WOLFPROV_BUFFER(int type, const unsigned char* buffer,
263263
unsigned int length);
264264

265-
#else
265+
#else /* WOLFPROV_DEBUG */
266266

267267
#define WOLFPROV_ENTER(t, m)
268268
#define WOLFPROV_LEAVE(t, m, r)

src/wp_logging.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,16 +151,19 @@ static void wolfprovider_log(const int logLevel, const int component,
151151
const char *const logMessage)
152152
{
153153
/* Check compile-time configuration first */
154-
if (!WOLFPROV_COMPILE_TIME_CHECK(component, logLevel))
154+
if (!WOLFPROV_COMPILE_TIME_CHECK(component, logLevel)) {
155155
return;
156+
}
156157

157158
/* Don't log messages that do not match our current logging level */
158-
if ((providerLogLevel & logLevel) != logLevel)
159+
if ((providerLogLevel & logLevel) != logLevel) {
159160
return;
161+
}
160162

161163
/* Don't log messages from components that do not match enabled list */
162-
if ((providerLogComponents & component) != component)
164+
if ((providerLogComponents & component) != component) {
163165
return;
166+
}
164167

165168
if (log_function) {
166169
log_function(logLevel, component, logMessage);

0 commit comments

Comments
 (0)