mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-85462 Mercurial: log files are polluted with mercurial logs
Never log.info for silent commands. log.debug everything the command and the output.
This commit is contained in:
@@ -189,22 +189,31 @@ public final class HgCommandExecutor {
|
||||
final String cmdString = String.format("%s %s %s", executable, operation, arguments == null ? "" : StringUtils.join(arguments, " "));
|
||||
|
||||
// log command
|
||||
LOG.info(cmdString);
|
||||
if (!myIsSilent) {
|
||||
LOG.info(cmdString);
|
||||
myVcs.showMessageInConsole(cmdString, ConsoleViewContentType.NORMAL_OUTPUT.getAttributes());
|
||||
}
|
||||
else {
|
||||
LOG.debug(cmdString);
|
||||
}
|
||||
|
||||
// log output if needed
|
||||
if (!myIsSilent && myShowOutput) {
|
||||
LOG.info(result.getRawOutput());
|
||||
myVcs.showMessageInConsole(result.getRawOutput(), ConsoleViewContentType.SYSTEM_OUTPUT.getAttributes());
|
||||
}
|
||||
else {
|
||||
LOG.debug(result.getRawOutput());
|
||||
}
|
||||
|
||||
// log error
|
||||
if (!myIsSilent) {
|
||||
LOG.info(result.getRawError());
|
||||
myVcs.showMessageInConsole(result.getRawError(), ConsoleViewContentType.ERROR_OUTPUT.getAttributes());
|
||||
}
|
||||
else {
|
||||
LOG.debug(result.getRawError());
|
||||
}
|
||||
}
|
||||
|
||||
private void showError(Exception e) {
|
||||
|
||||
Reference in New Issue
Block a user