Skip to content
This repository was archived by the owner on Apr 21, 2018. It is now read-only.

Top level config option to log command-line for eclipse to parse... default off #5

Merged
merged 1 commit into from
Nov 7, 2013
Merged

Conversation

TotallyPro
Copy link
Contributor

NOTE! This is half the change, will send another request for nar-maven-plugin based on whats already in my fork...

I found myself running by builds with -X in eclipse, just to get the CDT behavior I have come to expect. As long as the extensive logging didn't overrun the Console buffers I got my code-completion and navigations (F3) back.

However I decided to attempt to make nar-maven.plugin log the command-lines with less fuzz.
After a brief interaction with Johannes Schindelin I choose to make a top-level config option commandLog
that is default false. If set to true the command-lines only are lifted from DEBUG-level to INFO.

I have been using this for a couple of hours and it works like a charm and eclipse CDT is delivering again.

I hope to get this into mainstream since it is a quite simple addition and very usefull to anyone using CDT.

@buildhive
Copy link

NAR plugin for Maven » cpptasks-parallel #14 SUCCESS
This pull request looks good
(what's this?)

@dscho
Copy link
Member

dscho commented Sep 21, 2013

In principle, I like the idea of the topic branch, but I'd rather have it cleaned up a little. After all, the ultimate goal with cpptasks-parallel should be to get it into cpptasks, not to be stuck with an eternal fork. So we should focus not so much on what NAR requires, but more on a change of general utility that also happens to address our problem.

@dscho
Copy link
Member

dscho commented Sep 23, 2013

DEV@cloud: Can one of the admins verify this patch?

@TotallyPro
Copy link
Contributor Author

OK, I think I:ve been to quick in this since you are getting ready for release.
Still have things to learn and updates may come slowly some weeks.

I don't know git well enough to know if I can do something about bad commit messages...
I do know I can easily attempt an integer only vaiant where integers are directly interpreted as
loglevel. I can see if the compiler enumerations can give me a clue of how to make it a nicer
enum variant...
'''INFO'''

@dscho
Copy link
Member

dscho commented Sep 24, 2013

@TotallyPro with Git, it is easy to do something about bad commit messages: rewrite history with git-rebase. Simply start an interactive rebase (the original name of that command was edit-patch-series, which describes much better what an "interactive rebase" really is). For example, if you want to rewrite the commit message of the second-to-last commit, start git rebase HEAD~2. This will give you a so-called "edit script" in an editor, listing the two latest commits. If you replace the "pick" with a "reword" and quit the text editor, it will let you rewrite those commit messages. After that, your commit history has changed and you will need to "force-push" the branch, i.e. git push origin +HEAD (note the +). Neatly, force-pushing the branch will automatically update the corresponding pull request.

Looking forward to your changes!

@buildhive
Copy link

NAR plugin for Maven » cpptasks-parallel #16 SUCCESS
This pull request looks good
(what's this?)

@@ -1052,7 +1059,7 @@ public boolean accept(File file) {
.print("\r ");
System.err.print("\r");
System.err.flush();
log(Integer.toString(rebuildCount) + " files were compiled.");
log(Integer.toString(rebuildCount) + " files were compiled.",Project.MSG_VERBOSE);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There where many logs not stating which loglevel to use. When used in nar-maven-plugin it looked strange that these logs never showed when they should (MSG_WARN or MSG_ERROR cases)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. But it is a functionally different change from the one described in the commit message, and should therefore be in its own commit. See http://git-scm.com/book/en/Git-Tools-Rewriting-History#Splitting-a-Commit.

  In certain use cases, it is desirable to be able to change the log level
  at which cpptasks-parallel logs the command lines called for external
  commands, e.g. when the command lines are meant to be parsed by, say,
  Eclipse's CDT to make nicer logs.
@buildhive
Copy link

NAR plugin for Maven » cpptasks-parallel #17 SUCCESS
This pull request looks good
(what's this?)

dscho added a commit that referenced this pull request Nov 7, 2013
Top level config option to log command-line for eclipse to parse... default off
@dscho dscho merged commit 9cd3413 into maven-nar:master Nov 7, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants