Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Possible to force synchronous logging?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
rich  
View profile  
 More options Jul 13 2012, 4:51 pm
From: rich <rich.ea...@gmail.com>
Date: Fri, 13 Jul 2012 13:51:55 -0700 (PDT)
Local: Fri, Jul 13 2012 4:51 pm
Subject: Possible to force synchronous logging?

I've been using LumberJack and enjoying it over traditional logging macros.
 One thing that has been tripping me up, however, is that when I break in
the debugger, some times logs will still be in the queue and I won't see
their output.  Is there any way to force the logging to
occur synchronously (as NSLog does), so that everything has printed to
console right at the moment that line is executed?

Thanks


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robbie Hanson  
View profile  
 More options Jul 18 2012, 5:38 pm
From: Robbie Hanson <robbiehan...@deusty.com>
Date: Wed, 18 Jul 2012 14:38:46 -0700
Local: Wed, Jul 18 2012 5:38 pm
Subject: Re: Possible to force synchronous logging?

Yes, this is possible. The easiest way, if you want to do it temporarily, is just to toggle this in DDLog.h :

#define LOG_ASYNC_ENABLED YES

Just change it to NO, and asynchronous logging is disabled. You'll see how it gets uses in the header file.

There's also a comment block right above that section in the header file which you may want to check out. It basically encourages you to create your own MyLogging.h file so that you can customize stuff (such as asynchronous logging) to better suite your requirements. This means you won't need to make any changes to the open source files, meaning it will be easy to pull in updates, improvements and bug fixes in the future.

-Robbie Hanson


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
rich  
View profile   Translate to Translated (View Original)
 More options Jul 24 2012, 2:57 pm
From: rich <rich.ea...@gmail.com>
Date: Tue, 24 Jul 2012 11:57:52 -0700 (PDT)
Local: Tues, Jul 24 2012 2:57 pm
Subject: Re: Possible to force synchronous logging?

Awesome, thanks for the answer.

I agree with you that I should learn how to create my own logging config,
but that'll have to wait until there is more time.  Based on your 'easiest
way' advice, I added the following after I #import DDLog.h:

#if defined( LOG_ASYNC_ENABLED )
    #undef LOG_ASYNC_ENABLED
    #define LOG_ASYNC_ENABLED NO
#endif

This way, I don't have to edit your framework and I can prolong getting
into the nitty gritty. :)  I also only do this for debug, so errors /
warnings logged in release builds are still async.

Thanks again for such a flexible logging tool, I feel I'll be using it for
some time.

Cheers,
Rich


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »