Skip to content

Commit

Permalink
More changes to logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lomeli12 committed Aug 18, 2019
1 parent 44e2881 commit c88200a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
13 changes: 8 additions & 5 deletions src/main/vala/Beaver.vala
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,18 @@ namespace Beaver {
case "help":
retValue = noArgDisplay();
break;
default:
log.warn(@"\033[31mUnknown command: %s\033[0m", args[1]);
retValue = noArgDisplay();
break;
}
}
var finishTime = get_monotonic_time();
var timeSpent = (finishTime - startTime) / 1000000f;
var timeSpent = (int) Math.rintf((finishTime - startTime) / 1000000f);
if (retValue == 0) {
log.info(@"\033[1;32m%s\033[0m in %f(s)", "BUILD SUCCESSFUL", timeSpent);
log.info(@"\033[1;32m%s\033[0m in %ds", "BUILD SUCCESSFUL", timeSpent);
} else {
log.info(@"\033[1;31m%s\033[0m in %f(s)", "BUILD FAILED", timeSpent);
log.info(@"\033[1;31m%s\033[0m in %ds", "BUILD FAILED", timeSpent);
}
return retValue;
}
Expand Down Expand Up @@ -79,8 +83,7 @@ namespace Beaver {
log.info(@"\033[1;32m%s\033[0m", @"Welcome to Beaver 0.0.1\n");
log.info(@"\033[32m%s\033[33m - %s\033[0m", "build", "Compiles the project.");
log.info(@"\033[32m%s\033[33m - %s\033[0m", "clean", "Deletes the build directory.");
log.info(@"\033[32m%s\033[33m - %s\033[0m", "validate", "Reads out and prints information from the project's build.beaver for manual inspection.");
log.info(@"");
log.info(@"\033[32m%s\033[33m - %s\033[0m", "validate", "Reads out and prints information from the project's build.beaver for manual inspection.\n");
return 0;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/vala/project/BuildEnvironment.vala
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace Beaver.Project {
makeBuildFolder();
var commandBuilder = new StringBuilder();
// Initial Valac command
commandBuilder.append_printf("valac -X -w -q -o %s", BUILD_FOLDER);
commandBuilder.append_printf("valac -X -w -q --disable-warnings -o %s", BUILD_FOLDER);

// Adding output folder and executable name
var exeFileName = project.getAppInfo().getName();
Expand Down

0 comments on commit c88200a

Please sign in to comment.