coregl: Re-organize log solution 81/96281/2 accepted/tizen/3.0/common/20161114.082120 accepted/tizen/3.0/ivi/20161110.020454 accepted/tizen/3.0/mobile/20161110.020359 accepted/tizen/3.0/tv/20161110.020419 accepted/tizen/3.0/wearable/20161110.020437 accepted/tizen/common/20161109.140321 accepted/tizen/ivi/20161109.002937 accepted/tizen/mobile/20161109.002925 accepted/tizen/tv/20161109.002931 accepted/tizen/wearable/20161109.002934 submit/tizen/20161108.110211 submit/tizen_3.0/20161108.110713 submit/tizen_3.0_common/20161110.084657
authorZhaowei Yuan <zhaowei.yuan@samsung.com>
Sun, 16 Oct 2016 20:14:05 +0000 (04:14 +0800)
committerGwan-gyeong Mun <kk.moon@samsung.com>
Tue, 8 Nov 2016 10:52:06 +0000 (02:52 -0800)
commit54477d77f6f30b0d1a6a7aa9d0cac9c304e1ff0e
tree573b5de1125bd755ccc32814ec0966b72bc1e2b6
parent08a2f3aa20a44792e365283c41de7112b83fef69
coregl: Re-organize log solution

1. Create macro DLOG_DEFAULT_ENABLE to determine whether to use dlog or not
2. Replace orginal LOG functions with new created API COREGL_ERR, COREGL_WARN and COREGL_DBG
   - default log output: dlog
   - default log level: debug
      debug: COREGL_LOG_LEVEL=1, warning: COREGL_LOG_LEVEL=2, error: COREGL_LOG_LEVEL=3
   - howto change default log level or output?
     1) build time: change spec file's COREGL_DEFAULT_LOG_LEVEL / COREGL_DLOG_ENABLE macro
     2) execute time: execute with COREGL_LOG_LEVEL / COREGL_TRACE_DLOG   option
       example command: COREGL_LOG_LEVEL=2 COREGL_TRACE_DLOG=0 COREGL_TRACE_API=1 elementary_test -to "GLView gears"

3. Remove orginal color schemes and symbol "\n" since new API specify uniformly

4. Replace COREGL_LOG with TRACE for trace path
   - example command for logging to file: COREGL_LOG_FILE=/tmp/coregl_log.txt COREGL_TRACE_API=1 elementary_test -to "GLView gears"

Change-Id: I61cbc8d6dad6ce86ba4391c6dc846d08188ffaeb
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
16 files changed:
CMakeLists.txt
packaging/coregl.spec
src/coregl.c
src/coregl_internal.h
src/coregl_thread_pthread.c
src/modules/appopt/coregl_appopt.c
src/modules/fastpath/coregl_fastpath.c
src/modules/fastpath/coregl_fastpath_egl.c
src/modules/fastpath/coregl_fastpath_gl.c
src/modules/tracepath/coregl_tracepath.c
src/modules/tracepath/coregl_tracepath_egl.c
src/modules/tracepath/coregl_tracepath_gl.c
src/wraps/coregl_egl.c
src/wraps/coregl_gl1.c
src/wraps/coregl_gl2.c
src/wraps/coregl_gl_common.c