-
Notifications
You must be signed in to change notification settings - Fork 104
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
Explicitly log not sending mails if no build result is set + fix some German umlauts apart from Javadoc warnings #44
Conversation
Add explicit logging in case of unset build result.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I see what you've changed here.
} | ||
|
||
System.out.println("Not sending any mail as BuildResult is not set at all."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should use a logger here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the "standard" way for logging in Jenkins plugins? Log4j? Slf4J? Therefore I thought that StandardOut-Logging would result in an output in the job console .....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The standard way is either directly through java.util.logging or via SLF4J.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if java.util.logging works, but replaced the line in the code - thanks.
I ran into the problem that no mails were sent from a Pipeline build as the currentBuild.result was set to null. To make this state more explicit I would like the plugin to log something. While trying to get the builds green; i stumbled upon some Javadoc issues and tried to fixed them. Sorry for not providing more context in the first place. |
Use \u00E4 syntax for all characters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. The reason you're not seeing any logger output is because you need to enable logging at INFO or lower for the specified logger. You can configure that via the logging properties file or through the GUI.
Thanks @ottlinger! looks good, will merge it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO build log should be used instead of the system log in the warning message
Sorry, discovered the issue only during the second iteration |
@oleg-nenashev do you mean? |
Yes
…On Sun, Oct 21, 2018, 20:14 P. Ottlinger ***@***.*** wrote:
@oleg-nenashev <https://github.com/oleg-nenashev> do you mean?
listener.getLogger().println();
instead of the logger I introduced.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#44 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AC3IoABZxnPeW2HC0LuCpYtdaNn_6L3mks5unLmAgaJpZM4XZX1r>
.
|
-Organized imports after removing newly introduced logger.
@oleg-nenashev thanks for making the change clearer to me. As I'm not that much into Jenkins plugins I need a little bit more help :-) |
Sorry that I have not just proposed a change. Traveling, and my bandwidth
is limited
…On Sun, Oct 21, 2018, 20:28 P. Ottlinger ***@***.*** wrote:
@oleg-nenashev <https://github.com/oleg-nenashev> thanks for making the
change clearer to me. As I'm not that much into Jenkins plugins I need a
little bit more help :-)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#44 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AC3IoKnOqkaj5sVujim5wk-qa75NlWKlks5unLy8gaJpZM4XZX1r>
.
|
np - it gave me a chance to learn more. |
@oleg-nenashev are you ok with the current changes? Can you start the merge? Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you remove the defaultGoal
and add the comments in the javadoc field? Thanks.
Rename variable to comply with Java standard
@oleg-nenashev @alecharp @jvz |
@ottlinger the |
You may generate a locally running instance with mvn hpi:custom-war hpi:run
Simplified extraction of changes from line break logic. (Linebreak does not seem to work properly, but will file a different issue for that)
Merged upstream master into my PR to make it ready for merge - pls start your reviews @oleg-nenashev @alecharp @jvz |
ping |
@alecharp @oleg-nenashev can you recheck the PR and merge. I just updated to the latest changes in master. (I'd be happy to get the merges into the next release). |
ping @jvz @alecharp @oleg-nenashev - any chance this PR can get merged? Thanks. |
I'm not able to merge (no permissions). Oleg or Adrien might need to do it. |
Sorry for the delay. To me the code seems fine, even if you change some imports ordering, which would have been great not to have but 🤷♂️ The last bit that trouble me is still the I'd like to give @oleg-nenashev some time to say if the modification he asked for are meeting his requirement. When that's done, I'll merge and release. Again thank you @ottlinger for the contribution. |
ping @oleg-nenashev - are there any other with write access to this repo that could merge this PR? Thanks. |
ping @oleg-nenashev - anyone else with write access? Thanks for your help. |
I believe @alecharp is the current maintainer |
I can ship it since Adrien approved it |
@alecharp can you take a look after @oleg-nenashev s comment?! Thanks 👍 |
@alecharp can you do the merge - @oleg-nenashev thanks. |
Sorry, I missed your previous notification @ottlinger. Thank you for your contribution. |
Thanks for your help @alecharp & @oleg-nenashev |
While running into
https://stackoverflow.com/questions/37169100/use-jenkins-mailer-inside-pipeline-workflow
I realized that an explicit logging is needed if no build result is set.
During pipeline runs no result is set and no mail is sent out.