Skip to content
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

Move threadsafe logging functions and macros to more suitable locations #19178

Open
rh101 opened this issue Nov 18, 2018 · 0 comments
Open

Move threadsafe logging functions and macros to more suitable locations #19178

rh101 opened this issue Nov 18, 2018 · 0 comments

Comments

@rh101
Copy link
Contributor

rh101 commented Nov 18, 2018

  • cocos2d-x version: 3.17

AudioEngine-win32.cpp and AudioMacros.h have references to the following logging macros and methods that are threadsafe:

ALOGV, ALOGD, ALOGI, ALOGW, ALOGE
static void _winLog(const char *format, va_list args)
void audioLog(const char * format, ...)

  • First issue, there are no comments to indicate what the differences are between each of the ALOGV, ALOGD, ALOGI, ALOGW, ALOGE macros, or what their specific purpose is.

  • Second issue, they should be moved out of the audio code and into another more suitable file, since they aren't audio specific, but rather useful when working with threads. There are even comments in those files indicating that they need to be moved, such as:

AudioEngine-win32.cpp:
//FIXME: Move _winLog, winLog to a separated file

and

AudioMacros.h
//FIXME:Move the definition of the following macros to a separated file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant