title: How do I define a macro with variadic method in objective-C?
body: <p>The method I am trying to call is;</p>
  
  <pre><code>- (void)addLogWithLevel:(MDCLogLevel)logLevel logContent:(NSString *)logContent, ...
  {
      va_list args;
      va_start(args, logContent);
      NSString *message = [[NSString alloc] initWithFormat:logContent
                                                 arguments:args];
      va_end(args);
      MDCLog *log = [MDCLog logWithContent:message content:logLevel];
      [self.deviceLogs addObject:log];
  }
  </code></pre>
  
  <p>I have defined the macro as;</p>
  
  <pre><code>#define MDCLogDebug(format, ...) [[MDCLogController sharedController] addLogWithLevel:MDCLogLevelDebug logContent:(__VA_ARGS__)];
  </code></pre>
  
  <p>I have tried various formats of this macro, but nothing seems to work.</p>
  
  <p>If I am to call;</p>
  
  <pre><code>MDCLogDebug(@"Test:%@", @"Hey");
  </code></pre>
  
  <p>All I see in the console is;</p>
  
  <blockquote>
    <p>Hey</p>
  </blockquote>
  
  <p>Where am I going wrong? I'm new to using Variadic methods and my C isn't so great!</p>