jmdavison46 commented on pull request #86:
URL: https://github.com/apache/logging-log4cxx/pull/86#issuecomment-1008346079


   For run-time version information, what do you think of the approach taken by 
OpenSSL (https://www.openssl.org), i.e. providing a function that provides the 
run-time value of each of LOG4CXX_VERSION, LOG4CXX_VERSION_MAJOR, 
LOG4CXX_VERSION_MINOR, LOG4CXX_VERSION_PATCH, LOG4CXX_VERSION_TWEAK?
   
    
   
   File “include/openssl/opensslv.h.in” defines macros 
OPENSSL_VERSION_{MAJOR,MINOR,PATCH,PRE_RELEASE}; file “crypto/cversion.c” 
provides functions OPENSSL_version_num (which returns the value of 
OPENSSL_VERSION_NUMBER) and OPENSSL_version_{major, minor, patch, pre_release} 
that return the values of the respectively corresponding OPENSSL_VERSION_* 
macros.
   
    
   
   From: Robert Middleton ***@***.***>
   Reply-To: apache/logging-log4cxx ***@***.***>
   Date: Monday, 2022-01-03/ at 5:29 PM
   To: apache/logging-log4cxx ***@***.***>
   Cc: jmdavison46 ***@***.***>, Author ***@***.***>
   Subject: Re: [apache/logging-log4cxx] Update log4cxx.h.in (PR #86)
   
    
   
   The utility of LOG4CXX_VERSION_GET_{MAJOR,MINOR,PATCH,TWEAK} would be more 
obvious if we were to add a version identifier object (i.e. an externally 
visible integer value) to the DSO/DLL, which is something we should eventually 
do, arguably in the next release, to assess library version compatibility at 
run time. Such a version identifier would allow the client code to compare the 
compile-time LOG4CXX_VERSION to the LOG4CXX_VERSION baked into the DSO/DLL in 
use, and the LOG4CXX_VERSION_GET_{MAJOR,MINOR,PATCH,TWEAK} macros would allow 
the code to report the (potentially conflicting) values in a human-readable 
manner instead of the unreadable LOG4CXX_VERSION format.
   
   That is what I was assuming the macros were for, but since there was no 
corresponding addition to any of the code to return a version number it didn't 
make much sense to me.
   
   If you are able to add that easily, that would be helpful, otherwise I will 
do it sometime in the coming days.
   
   —
   Reply to this email directly, view it on GitHub, or unsubscribe.
   Triage notifications on the go with GitHub Mobile for iOS or Android. 
   You are receiving this because you authored the thread.Message ID: 
***@***.***>
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to