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

Improve logging routines by using > 2.079 feature #212

Merged
merged 4 commits into from
Aug 24, 2020

Conversation

Geod24
Copy link
Contributor

@Geod24 Geod24 commented Jul 24, 2020

See each commit for the description of what they do.

Since DMD v2.079.0 it is possible to put default, always-used default parameters
after variadic arguments (as long as IFTI is used).
This way we can move all the compile-time arguments, which would always trigger
a template instantiation, to runtime arguments, and re-enable module and function.
Many places around were re-inventing logException with varying level of success.
In addition, the full error is now printed as a diagnostic instead of debug.
This is more in line with the description of `LogLevel.diagnostic`
("Extended user information (e.g. for more detailed error information)"),
as opposed to the one of `LogLevel.debug_`
("Developer information useful for algorithm debugging").
@Geod24 Geod24 merged commit 2583421 into vibe-d:master Aug 24, 2020
@Geod24 Geod24 deleted the improve-log branch August 24, 2020 03:18
@s-ludwig
Copy link
Member

Just noting that the log API changes are technically breaking changes that require a major version bump, even if nobody is likely to be affected by it.

@Geod24
Copy link
Contributor Author

Geod24 commented Sep 19, 2020

Right. I wasn't quite sure how to proceed here.

  1. Obviously making a new major for this was overkill;
  2. Even if I went for a new major, what policy should be followed ? Should all new developments go to the v1.x.x release, or directly to the new master ?
  3. A new major in a library that follow semver entails a new major in all downstream libraries. That means more work on Vibe.d & anything that depends on them.

So instead I checked that this did not affect Vibe.d (and looked for other users).
How would you prefer we address point 2 ? By the way the motivation for this PR was not merely to clean up things, but we were having issues debugging our server because some Exceptions trace would not show even at diagnostic level.

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

Successfully merging this pull request may close these issues.

None yet

2 participants