Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8942749
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:35:37+00:00 2026-06-15T11:35:37+00:00

I am doing a bunch of logging when I’m testing my application which is

  • 0

I am doing a bunch of logging when I’m testing my application which is useful for getting information about variable state and such.

However I have read that you should use logging sparsely in production code (because it can potentially slow down your application). But my question is now: if my app is in production and people are using it, whenever a crash (god forbid) occurs, how will I be able to interpret the crash information if I have removed the logging statements? Then I suppose I will only have a stacktrace for me to interpret?

Does this mean I should leave logging in production code only WHERE it’s really essential for me to interpret what has happened?

Also how will the logging statements relate to the crash reports? Will they be combined? I’m thinking of using Flurry as analytics and crash reports…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T11:35:39+00:00Added an answer on June 15, 2026 at 11:35 am

    You most definitely should include lots of logging in your released app. As you suspect, it can help you immensely when debugging, and it can even help your power users self-debug if you make sure your log messages are well-worded, reasonably self-explanatory and include all the relevant details.

    There are many aspects to a good logging system. There’s a few common patterns that are often good to follow (though on iOS specifically some apply more-so than others):

    1. Distinguish your logs by severity. Errors, warnings, informative, debug, for example. Syslog does this, as another example. In addition to helping you focus on more severe problems first, you can set a minimum level for your release build of “informative”, say, and thus exclude the more verbose debug ones, while keeping most all the ones you’ll need when things go wrong. That way you trim out log messages that may be very verbose or frequent (and thus risk slowing down your app) but leave in important ones.
    2. Allow configuration of logging levels at runtime (typically done via command-line flags, though not on iOS obviously). For example, you could by default show only warnings and errors, but optionally expand that via a flag.
    3. Include file name and line number in all log messages, at least in debug builds. You may have reservations about including file names in release builds, but at least include the line number – it’ll help ensure you’re looking at the right code come debugging time; you may (accidentally or intentionally) have similar-looking log statements from multiple places in the same file.
    4. Write your log messages in plain English, with good grammar and minimal abbreviations, and include the values of all relevant variables. Also include a statement about the consequences of the condition, in the case of errors or warnings. e.g. “Unable to connect to someserver:1234 – error -18 (ETIMEOUT). Cannot determine if there are app updates available.”.
    5. Minimise user-sensitive data in your logs, and be very careful what you do with any logs that contain it. Don’t ever log passwords or things of that nature – not even ancillary things like their length, or hashes. Be mindful that even something seemingly benign like a website address they provide can be considered sensitive (they might not want it known that they frequent http://www.lumberjacksandpressedwildflowers.com). This is especially important if you have any kind of transmission of those logs – you’ll need to adopt SSL etc.

    You can get a lot of these features from pre-built logging systems, e.g. CocoaLumberjack and NSLogger (or both). No doubt there’s others.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm doing a bunch of weird generic stuff which includes doing a lot of
I've got a bunch of methods in my application service layer that are doing
If I have a bunch of stuff in quotes I find myself doing something
Doing the getting started of Sinatra. I get this error: ./sinatra.rb:5: undefined method `get'
Doing my first SL4 MVVM RIA based application and i ran into the following
I've heard a bunch of podcasts recently about the TPL in .NET 4.0. Most
I'm doing a bunch of core data inserts and after 20k or so inserts
I'm pretty new to C#, I've been doing a bunch of stuff but I'm
i am doing some work for an iphone app that retrieves a bunch venues
I'm doing a bunch of sum queries: SELECT col1 + col2 + col3 +

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.