Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix backward compatibiltiy #228

Open
bitFiedler opened this issue Nov 4, 2022 · 5 comments
Open

Fix backward compatibiltiy #228

bitFiedler opened this issue Nov 4, 2022 · 5 comments

Comments

@bitFiedler
Copy link

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)

@SergiusTheBest
Copy link
Owner

How did you find it?

@bitFiedler
Copy link
Author

bitFiedler commented Nov 10, 2022

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.

@bitFiedler
Copy link
Author

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.

@SergiusTheBest
Copy link
Owner

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?

@bitFiedler
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants