diff options
author | Max Romanov <max.romanov@nginx.com> | 2020-11-18 22:33:53 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2020-11-18 22:33:53 +0300 |
commit | 8340ca0b9c7ad4109033ccb028f87cc1b73396bc (patch) | |
tree | 08c5c76b11c3271ce2dff14c61c3b7535cf014e8 /src/nxt_unit.c | |
parent | fb80502513bf0140c5e595714967f75ea3e1e5d3 (diff) | |
download | unit-8340ca0b9c7ad4109033ccb028f87cc1b73396bc.tar.gz unit-8340ca0b9c7ad4109033ccb028f87cc1b73396bc.tar.bz2 |
Libunit: improving logging consistency.
Debug logging depends on macros defined in nxt_auto_config.h.
Diffstat (limited to 'src/nxt_unit.c')
-rw-r--r-- | src/nxt_unit.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nxt_unit.c b/src/nxt_unit.c index 7230552d..564fd094 100644 --- a/src/nxt_unit.c +++ b/src/nxt_unit.c @@ -6527,7 +6527,9 @@ nxt_unit_malloc(nxt_unit_ctx_t *ctx, size_t size) p = malloc(size); if (nxt_fast_path(p != NULL)) { +#if (NXT_DEBUG_ALLOC) nxt_unit_debug(ctx, "malloc(%d): %p", (int) size, p); +#endif } else { nxt_unit_alert(ctx, "malloc(%d) failed: %s (%d)", @@ -6541,7 +6543,9 @@ nxt_unit_malloc(nxt_unit_ctx_t *ctx, size_t size) void nxt_unit_free(nxt_unit_ctx_t *ctx, void *p) { +#if (NXT_DEBUG_ALLOC) nxt_unit_debug(ctx, "free(%p)", p); +#endif free(p); } |