c - How to write reusable functions that do logging -


i'm writing application in c. want split various functions main() calls few functions. nice if these functions reusable, application (for example add-on) use these. these functions logging doing, because main application designed interact user - add-on programs don't neccessarily have interact users, , such don't have logging.

so, programs want use of functions not depend on functions itself, on logging function. worse if program doesn't want logging. how solve this?

you this:

#ifdef logging //logging code #endif 

Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -