Remove date stamp?

Discussion in 'Mac Programming' started by Ruske Frost, Jul 22, 2011.

  1. Ruske Frost macrumors newbie

    Jul 1, 2011
    Hey all, I just started learning Objective C 2.0 via Stephen Kochan's book (literally just about a half hour ago) and I'm wondering if i can remove the date stamp produced in every line of my target output after an NSLog entry?

    I'm trying to remove some of the bulk mixed in with what actually took place. Makes it feel a little more clean and easier to understand for someone such as myself :)

  2. chown33 macrumors 604

    Aug 9, 2009
    Sailing beyond the sunset
    Short answer: No.

    Long answer: Not that I'm aware of, although you could probably write your own replacement, once you know more, or copy someone else's:

    This also has some useful tips:
  3. wlh99 macrumors 6502

    Feb 7, 2008
    In the long run, it probably won't matter.

    NSLog is meant to log information to the console, not for general I/O. Logs generally include a timestamp.

    Later in your learning you will use other methods for I/O, but for now NSLog doens't require much of an education.

    You could read up on printf, and for some uses you could use it in place of NSLog. However, you can't (directly) print an NSString with printf. For the fraction examples it might work fine.
  4. Ruske Frost thread starter macrumors newbie

    Jul 1, 2011
    Alright, well, if there's nothing that can be done it's alright. I just wanted to see if there was a more "clean" way to see what my literal output would look like (without anything extra) - and by the way, is there a way to have an additional window or something like that to preview what the output or product of what is written will be?

    I assume no, since the answer to my first question was no (and this question was nearly the same...). But I figured I'd just give it a shot.

    If not I'll just get used to it like everyone else does :)

    Thank you for your quick replies, by the way.

Share This Page