-
Notifications
You must be signed in to change notification settings - Fork 252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable console logging if MONO or LOGGER is defined #159
Conversation
67ed7dc
to
34afd85
Compare
Re-enable console logging on linux and mac builds with the -DMONO option. Rename overloaded Debug_ConsolePrintf function to Debug_ConsolePrintfAt to fix macro expansion. Adds -DLOGGER alias for -DMONO. Implements DescentDevelopers#157
34afd85
to
9753f83
Compare
CMakeLists.txt
Outdated
set(PLATFORM_INCLUDES "lib/linux" ${SDL_INCLUDE_DIR}) | ||
endif() | ||
|
||
if(APPLE) | ||
message("Building for MAC OSX") | ||
add_definitions(-D_DEBUG -D__LINUX__ -DLINUX -D_MAX_PATH=260 -D_MAX_FNAME=256 -D_REENRANT -DMACOSX=1 -D_USE_OGL_ACTIVE_TEXTURES) | ||
add_definitions(-D_DEBUG -D__LINUX__ -DLINUX -D_MAX_PATH=260 -D_MAX_FNAME=256 -D_REENRANT -DMACOSX=1 -D_USE_OGL_ACTIVE_TEXTURES -DLOGGER) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we want this definition conditionally, if the user specified the CMake Option LOGGER
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added in latest commit
lib/mono.h
Outdated
@@ -66,12 +66,12 @@ | |||
#include "debug.h" | |||
void nw_InitTCPLogging(char *ip, unsigned short port); | |||
void nw_TCPPrintf(int n, char *format, ...); | |||
#if (!defined(RELEASE)) && defined(MONO) | |||
#if (!defined(RELEASE)) && (defined(MONO) || defined(LOGGER)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need to keep both, LOGGER
is enough
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to keep both so we could keep the MONO code for historical reasons if we add a logging library. But it's easy enough to resurrect MONO later.
* Adds CMake Option * Adds LOGGER to the README * Removes MONO define in favor of LOGGER
Tested, works great. Thanks! |
Enable console logging if MONO or LOGGER is defined
Re-enable console logging on linux and mac builds with the -DMONO option.
Rename overloaded Debug_ConsolePrintf function to
Debug_ConsolePrintfAt to fix macro expansion.
Adds -DLOGGER alias for -DMONO.
Implements #157