-
Notifications
You must be signed in to change notification settings - Fork 172
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
[#737] Extension logging #755
[#737] Extension logging #755
Conversation
a2c2080
to
8717bce
Compare
@Mogztter Do you have any objections against these changes? |
Sorry for the delay.
No I do not have any objection 😉 void log(LogRecord logRecord);
<T> T unwrap(Class<T> clazz); The
I'm still trying to figure it out so I don't really mind for now. |
I haven't been on the whole conversation but should we add |
Good idea! |
@Mogztter Awesome, thanks! I wanted to have your approval as this will break your current AsciidoctorG. I was thinking about creating a asciidoctorj-1.6.0 branch soon, and then let master evolve to 2.0.0. |
Why not, |
I think the branch should be named asciidoctorj-1.6.x (or asciidoctorj-1.6.0.x). Aside from that, 👍 Once 2.0.0 is out, I'd like to use a more standard branch naming pattern. I've been using v2.0.x in other projects that use SemVer, though I'm open to discuss the "v" prefix. Perhaps best in a separate issue. |
Since I know that Maven prepends the
http://maven.apache.org/maven-release/maven-release-plugin/examples/prepare-release.html It should be possible to do the same with Gradle. Not saying that we should do it but it's possible to do so if we want to adopt a new format 😉 |
I don't have any specific preference :-) asciidoctorj-1.6.x would continue the tradition of asciidoctorj-1.5.x. |
8717bce
to
25f912c
Compare
Rebased. |
That's a strong argument for. 🤔 |
I already went ahead and created a branch |
I don't think any branch renames are necessary until 2.0.0. The 2.0.0 is the dawn of the new era where we try new things. |
This PR fixes #737 and allows extensions to also log LogRecords.
These LogRecords don't pass through Asciidoctor/Ruby though, so that handlers registered in Ruby won't get notified of them.
I had to make larger changes to the extension infrastructure to give extension access to their owning Asciidoctor instance.
@Mogztter This is a breaking change that will also hit you in AsciidoctorG, I renamed and changed the Interface that creates the extension delegates.
An extension now has a method
unwrap(Class<?>)
that allows to get the corresponding implementation.