oraelbis,
> > ATL_TRACE_LEVEL
It's not that hard to make you're own version of a ATL_TRACE_LEVEL.
Main Topics
Browse All TopicsI'm use MS VS7.2003 NET
I'd like filter debug messages by levels. But don't know how set debug level for project.
//error message
ATLTRACE2(traceAppMsg, 0, "My info text 0\n");
I'm show it
//trace message
ATLTRACE2(traceAppMsg, 4, "My info text\n");
don't show it
What have I to do, to show info message?
#define ATL_TRACE_LEVEL not supported in VS7 :(
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
>Do you want to filter the messages at compile time or at runtime?
At runtime
>What happens when you define above macro in VS7?
>#define ATL_TRACE_LEVEL 2
Nothing, I still view only 0 level messages
>It's not that hard to make you're own version of a ATL_TRACE_LEVEL.
I'm prefer to use log4cplus in this way, but my boss don't want to use external libraries
>declare a global instance of CTraceCategory with second param as level.
>CTraceCategory MY_CATEGORY( "MyCategoryName", 1 );
>and then
>ATLTRACE2( MY_CATEGORY, 2, "a message in a custom category" );
Nothing, this is for additional grouping for my own categories
There is a tool for change trace level in menu "Tools->ATL/MFC Trace Tool"
I can use it for controlling tracing, but I'd like to change default trace level in debug mode.
Business Accounts
Answer for Membership
by: AxterPosted on 2005-03-01 at 09:52:38ID: 13431616
Hi oraelbis,
> >I'd like filter debug messages by levels. But don't know how set debug
> >level for project.
Do you want to filter the messages at compile time or at runtime?
Cheers!