[Ace-users] How to disable DEBUG by logging strategy?
weiping_guo at yahoo.com
Tue Jun 19 10:07:48 CDT 2007
ACE VERSION: 5.5.8
HOST MACHINE and OPERATING SYSTEM:
If on Windows based OS's, which version of WINSOCK do you
TARGET MACHINE and OPERATING SYSTEM, if different from HOST:
COMPILER NAME AND VERSION (AND PATCHLEVEL):
THE $ACE_ROOT/ace/config.h FILE [if you use a link to a platform-
specific file, simply state which one]: win-32
THE $ACE_ROOT/include/makeinclude/platform_macros.GNU FILE [if you
use a link to a platform-specific file, simply state which one
(unless this isn't used in this case, e.g., with Microsoft Visual
CONTENTS OF $ACE_ROOT/bin/MakeProjectCreator/config/
(used by MPC when you generate your own makefiles):
[What example failed? What module failed to compile?]
DOES THE PROBLEM AFFECT:
On Unix systems, did you run make realclean first?
OTHER (please specify)?
[Please indicate whether ACE, your application, or both are affected.]
[Brief description of the problem]
How to disable DEBUG by using Logging Strategy?
[Detailed description of problem. Don't just say "<blah>
doesn't work, here's a fix," explain what your program does
to get to the <blah> state. ]
I have defined the following macro for my project:
#define TRACE_PREFIX ACE_TEXT("[%D] [TRACE] ")
#define DEBUG_PREFIX ACE_TEXT("[%D] [DEBUG] ")
#define INFO_PREFIX ACE_TEXT("[%D] [INFO] ")
#define NOTICE_PREFIX ACE_TEXT("[%D] [NOTICE] ")
#define WARNING_PREFIX ACE_TEXT("[%D] [WARNING] ")
#define MY_DEBUG(FMT, ...)\
ACE_DEBUG(( LM_DEBUG, \
DEBUG_PREFIX THREAD_PREFIX ACE_TEXT(FMT) \
This macro is used in the application for consistence purpose. I want
to control the debug level in the runtime by loading the following
dynamic Logger Service_Object *
"-s log.out -f STDERR|OSTREAM -p INFO|WARN|ERROR|CRITICAL -w"
The event loop is started. However, the debug information is still
output to the log file.
Is anything I did wrong? My application is a heavy multithreaded, is
it has something to do with it?
Any suggestions are apprecatied!
[What you did to get the error; include test program or session
transcript if at all possible. ]
[If available ]
More information about the Ace-users