diff --git a/README.md b/README.md index 78397b0..bca4f62 100644 --- a/README.md +++ b/README.md @@ -145,6 +145,16 @@ option when embedding into a library project is `ZF_LOG_LIBRARY_PREFIX`. It could be used to decorate zf_log exported symbols to avoid linker conflicts (when that library project is used in other project that is also uses zf_log). +#### Minimizing Output File Size + +As part of zf_log's main to be small, log strings below the current log level +can be compiled out using optimization features in modern compilers. In +```Debug``` builds, unused strings may not be compiled out and a ```Release``` +build may be necessary. Not all compilers will be capable of optimizing out +unused parts of a program, but gcc provides this functionality using the +```-fdata-sections``` and ```-ffunction-sections``` compile flags, the link flag +```-Wl,--gc-sections```, and size optimization flag ```-Os```. + ### Embedding with CMake Another options is avaibale for projects that are using CMake. Copy