summaryrefslogtreecommitdiff
path: root/src/portal/cpy
diff options
context:
space:
mode:
authorAndrew Opalach <andrew@akon.city> 2025-04-17 10:03:43 -0400
committerAndrew Opalach <andrew@akon.city> 2025-04-17 10:03:43 -0400
commiteccba12e1fe3c1b9510e274cd8ddfa94bba6f489 (patch)
tree43cef769c453fcb3854f80cb5f1831d512098167 /src/portal/cpy
parentae8822ec0327c4d5674f1dc79de926b230f27f1f (diff)
downloadcamu-eccba12e1fe3c1b9510e274cd8ddfa94bba6f489.tar.gz
camu-eccba12e1fe3c1b9510e274cd8ddfa94bba6f489.tar.bz2
camu-eccba12e1fe3c1b9510e274cd8ddfa94bba6f489.zip
Implement logging changes and cleanup
Signed-off-by: Andrew Opalach <andrew@akon.city>
Diffstat (limited to 'src/portal/cpy')
-rw-r--r--src/portal/cpy/lib.pxd8
-rw-r--r--src/portal/cpy/portal.pyx8
-rw-r--r--src/portal/cpy/setup.py2
3 files changed, 9 insertions, 9 deletions
diff --git a/src/portal/cpy/lib.pxd b/src/portal/cpy/lib.pxd
index 5749141..6a5b69c 100644
--- a/src/portal/cpy/lib.pxd
+++ b/src/portal/cpy/lib.pxd
@@ -7,7 +7,7 @@ cdef extern from "<al/lib.h>":
void al_bzero(void *s, size_t n)
cdef extern from "<al/log.h>":
- s32 al_log_info(const char *ns, const char *, ...)
- s32 al_log_warn(const char *ns, const char *, ...)
- s32 al_log_error(const char *ns, const char *, ...)
- s32 al_log_debug(const char *ns, const char *, ...)
+ s32 log_info(const char *, ...)
+ s32 log_warn(const char *, ...)
+ s32 log_error(const char *, ...)
+ s32 log_debug(const char *, ...)
diff --git a/src/portal/cpy/portal.pyx b/src/portal/cpy/portal.pyx
index 22d2ef9..b9b6e8d 100644
--- a/src/portal/cpy/portal.pyx
+++ b/src/portal/cpy/portal.pyx
@@ -7,16 +7,16 @@ import sys
sys.path.append('./py')
cdef int log_info(char *message) except -1:
- return lib.al_log_info("portal", "%s", message)
+ return lib.log_info("%s", message)
cdef int log_warn(char *message) except -1:
- return lib.al_log_warn("portal", "%s", message)
+ return lib.log_warn("%s", message)
cdef int log_error(char *message) except -1:
- return lib.al_log_error("portal", "%s", message)
+ return lib.log_error("%s", message)
cdef int log_debug(char *message) except -1:
- return lib.al_log_debug("portal", "%s", message)
+ return lib.log_debug("%s", message)
def encode_str(str):
return str.encode('UTF-8')
diff --git a/src/portal/cpy/setup.py b/src/portal/cpy/setup.py
index 7267bff..d14068f 100644
--- a/src/portal/cpy/setup.py
+++ b/src/portal/cpy/setup.py
@@ -3,4 +3,4 @@ from Cython.Build import cythonize
from Cython.Compiler import Options
Options.embed = True
alabaster_inc = "../../../subprojects/libalabaster/include"
-cythonize([Extension("portal", ["./portal.pyx"], include_dirs=[alabaster_inc], extra_link_args=[])], language_level=3)
+cythonize([Extension("portal", ["./portal.pyx"], include_dirs=[alabaster_inc], extra_link_args=[], define_macros=[("AL_LOG_SECTION", "portal")])], language_level=3)