Don't get any logs att DBUG level

32 views
Skip to first unread message

Jonatan

unread,
Mar 13, 2012, 4:13:14 AM3/13/12
to Logog
Hi!

I'm trying out logog for use in a new software and I would appreciate
some help. In the main function in the project I set up logog
immediately and creates a log message at every level:

LOGOG_INITIALIZE();
logog::LogFile errFile("log.txt");
DBUG("Debug");
INFO("Info");
WARN3("Warning3");
WARN2("Warning2");
WARN1("Warning1");
WARN("Warning");
ERR("Error");
ALERT("Alert");
CRITICAL("Critical");
EMERGENCY("Emergency");

This produces nine rows in the logfile and not ten. The missing one is
"Debug".

I compile with -DLOGOG_LEVEL=LOGOG_LEVEL_ALL and I have assured that
other levels (LOGOG_LEVEL_NONE, LOGOG_LEVEL_ERROR etc) gives the
desired result.

Do you have any thoughts of what I can try to make it work?

Jonatan Lindström

John Byrd

unread,
Mar 13, 2012, 5:50:08 AM3/13/12
to Logog
For whatever reason your compiler may not be happy with setting flags
via -D. Try editing const.hpp and modifying this line:

#define LOGOG_LEVEL LOGOG_LEVEL_INFO

to

#define LOGOG_LEVEL LOGOG_LEVEL_DEBUG

jwb

Jonatan

unread,
Mar 13, 2012, 6:48:03 AM3/13/12
to Logog
Thank you for quick response!

Setting of flags with -D works fine for other levels. I have tried
setting it to LOGOG_LEVEL_NONE and then no logs where made and also
one of the middle levels wich also worked properly.

I have now tried to edit const.hpp. I confirmed that changes are only
considered if I dont set the flag through the compiler as well.
However the result was the same. I can specify level but
LOGOG_LEVEL_DEBUG is never used.

/Jonatan

John Byrd

unread,
Mar 13, 2012, 3:07:34 PM3/13/12
to lo...@googlegroups.com
Did you recompile the logog library, or just your test program?  You'll need to recompile both with the flag setting for each of them.

jwb

--
You received this message because you are subscribed to the Google Groups "Logog" group.
To post to this group, send email to lo...@googlegroups.com.
To unsubscribe from this group, send email to logog+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/logog?hl=en.




--
---

John Byrd
Gigantic Software
2102 Business Center Drive
Suite 210-D
Irvine, CA   92612-1001
http://www.giganticsoftware.com
T: (949) 892-3526 F: (206) 309-0850

John Byrd

unread,
Mar 13, 2012, 6:17:18 PM3/13/12
to lo...@googlegroups.com
And if it helps, I just changed the default setting so this shouldn't be a problem for you in the future.  Get the latest and recompile the library from scratch.

jwb

Jonatan

unread,
Mar 14, 2012, 4:18:11 AM3/14/12
to Logog
Hi!

How silly of me, I didn't consider recompiling logog. Now it works.

I think it is wise to enable the debug level by default.
(and I dont JUST write that because I didn't figure it out) ;-)

Tanks!
/jonatan

On 13 mar, 23:17, John Byrd <jb...@giganticsoftware.com> wrote:
> And if it helps, I just changed the default setting so this shouldn't be a
> problem for you in the future.  Get the latest and recompile the library
> from scratch.
>
> jwb
>
> On Tue, Mar 13, 2012 at 12:07 PM, John Byrd <jb...@giganticsoftware.com>wrote:
>
>
>
>
>
>
>
>
>
> > Did you recompile the logog library, or just your test program?  You'll
> > need to recompile both with the flag setting for each of them.
>
> > jwb
>
> Irvine, CA   92612-1001http://www.giganticsoftware.com
Reply all
Reply to author
Forward
0 new messages