• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Name of current function/selector
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Name of current function/selector


  • Subject: Name of current function/selector
  • From: Lawrence Sanbourne <email@hidden>
  • Date: Sat, 22 Oct 2005 12:02:30 -0500

Hi,

I'd like to write a fancy macro that automates the process of making
NSLog statments like this:

+ (id)classMethod
{
    NSLog(@"+[ClassName classMethod]: some error occurred");
}

- (id)instanceMethod:(id)arg
{
    NSLog(@"-[ClassName instanceMethod:]: some error occurred");
}

int f(x)
{
    NSLog(@"f(): some error occurred");
}

Ideally I'd like the macro syntax to look like this:

LSLog("some error occurred");

And then it would check the current context to decide how to output
the log message. Is this even possible?

Larry
--
Larry Sanbourne
email@hidden
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Name of current function/selector
      • From: Pontus Ilbring <email@hidden>
  • Prev by Date: Re: Core Data - Initializing with standard data
  • Next by Date: Re: Core Data - Initializing with standard data
  • Previous by thread: Re: Core Data - Initializing with standard data
  • Next by thread: Re: Name of current function/selector
  • Index(es):
    • Date
    • Thread