plog
plog copied to clipboard
Fix backward compatibiltiy
Because of the Constructor interface changes, backward compatibility should be kept. By initialize the instanceId with the fallback value, there should be no problems by updating to newer versions. Because since git #8d9767390eb0c2f7f05c68cfcbba698042f8d0a0 Add logger instanceId into Record (#141) the interface had changed and with older implementations it was not possible to adapt without changed.
Here is the changed line in Record.h
Record(Severity severity, const char* func, size_t line, const char* file, const void* object, int instanceId = 0)
How did you find it?
Record.zip that is done in the Record.h file line 229 with the constructor call. the last argument instanceId is set with an default value to 0.
because old version do not know of the instanceId and therefore the new argument break the compile, therefore I found the new extension and add it the default. that fixed the build and all was good.
I mean how do you mix old and new versions? What is using the old version and what is using the new version and how those parts are connected to each other?
I only updated plog to the latest version and add it as lib. The linking didn’t worked because of the changed interface. Therefore I fixed the Interface.