I wanted to define a macro like -
#define log(lognumber,...) logreport(lognumber,__VA_ARGS__)
I wanted to check the exception case for __VA_ARGS__
those arguments user can pass when that user calls log() .please provide me exception case for __VA_ARGS__
.
[update from comment:]
I mean I wanted to write logreport in such a way that it should print the specific number to the error that I had defined already.
Taking an example like if I am passing
log(NOTE,"%s",str)
then in that case it prints the specific ids which I have assigned in another file like this msgid %s, msdstr %s (10223)
, but user uses
log(NOTE,"DIRECT STRING")
it does take the [???] for that string. So how would I check that if user is passing an argument this way
log(NOTE,"%s",str)
or
log(NOTE,"direct string")
this way in logreport function?