My project is a framework. It does itself do logging with its own implementation but should also be able to use a logging library the user chooses for his application. Since logging libraries like log4cl are very much based on macros I'm not quite sure how to accomplish this because as I understand macros must be loaded first, before functions, etc.
What I came up with is asdf based. I provide a simple package that exports symbols like: lerror, lwarn, ldebug, etc. which should be implemented as macros allowing to make special implementation for log4cl or other log libraries.
I.e. a simple logging implementation that comes with my framework is just using FORMAT and dumping to *standard-output*.
The asdf approach them requires to make systems. One for the lisp file that just defines the package with exported symbols. Then other systems, based on the last, that provide the specific implementations as macros. The user would then have to define a sequence of systems that must be specified before the actual framework system in order to have the framework 'use' a specific logging library (that is available for the macro-expansion phase).
While this works, I'm not sure this is the right approach. It seems quite complicated. Wouldn't we deal with macros the approach would simply be to define generic functions and provide specific implementation, but they wouldn't require to be defined first.