Skip to content

Commit

Permalink
Add debug mode to RayAOP extension
Browse files Browse the repository at this point in the history
A debug output toggle has been introduced to the RayAOP extension. This allows for conditional output of debug information, which may assist in troubleshooting issues with the extension. The output can be controlled using the --enable-rayaop-debug option during the configuration process.
  • Loading branch information
koriym committed Jul 10, 2024
1 parent f0e09a3 commit ae15d2f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,14 @@ if test "$PHP_RAYAOP" != "no"; then
PHP_ARG_ENABLE(rayaop-quiet, whether to suppress experimental notices,
[ --enable-rayaop-quiet Suppress experimental notices], no, yes)

PHP_ARG_ENABLE(rayaop-debug, whether to enable debug output,
[ --enable-rayaop-debug Enable debug output], no, yes)

if test "$PHP_RAYAOP_QUIET" != "no"; then
AC_DEFINE(RAYAOP_QUIET, 1, [Whether to suppress experimental notices])
fi

if test "$PHP_RAYAOP_DEBUG" != "no"; then
AC_DEFINE(RAYAOP_DEBUG, 1, [Whether to enable debug output])
fi
fi
4 changes: 4 additions & 0 deletions rayaop.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
#define RAYAOP_QUIET 0
#endif

#ifndef RAYAOP_DEBUG
#define RAYAOP_DEBUG 0
#endif

#include "php_rayaop.h" /* Include header file for RayAOP extension */

/* Declaration of module global variables */
Expand Down

0 comments on commit ae15d2f

Please sign in to comment.