Skip to content

Commit c2c46bb

Browse files
committed
1582: cleanup logging
1 parent 6f0dd0b commit c2c46bb

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

lib/src/main/java/com/diffplug/spotless/npm/EslintFormatterStep.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
*/
1616
package com.diffplug.spotless.npm;
1717

18-
import static com.diffplug.spotless.LazyArgLogger.lazy;
1918
import static java.util.Objects.requireNonNull;
2019

2120
import java.io.File;
@@ -116,7 +115,7 @@ protected void prepareNodeServerLayout() throws IOException {
116115
// If any config files are provided, we need to make sure they are at the same location as the node modules
117116
// as eslint will try to resolve plugin/config names relatively to the config file location and some
118117
// eslint configs contain relative paths to additional config files (such as tsconfig.json e.g.)
119-
logger.info("Copying config file <{}> to <{}> and using the copy", origEslintConfig.getEslintConfigPath(), nodeServerLayout.nodeModulesDir());
118+
logger.debug("Copying config file <{}> to <{}> and using the copy", origEslintConfig.getEslintConfigPath(), nodeServerLayout.nodeModulesDir());
120119
File configFileCopy = NpmResourceHelper.copyFileToDir(origEslintConfig.getEslintConfigPath(), nodeServerLayout.nodeModulesDir());
121120
this.eslintConfigInUse = this.origEslintConfig.withEslintConfigPath(configFileCopy).verify();
122121
}
@@ -162,8 +161,6 @@ public EslintFilePathPassingFormatterFunc(File projectDir, File nodeModulesDir,
162161

163162
@Override
164163
public String applyWithFile(String unix, File file) throws Exception {
165-
logger.info("formatting String '{}[...]' in file '{}'", lazy(() -> unix.substring(0, Math.min(50, unix.length()))), file);
166-
167164
Map<FormatOption, Object> eslintCallOptions = new HashMap<>();
168165
setConfigToCallOptions(eslintCallOptions);
169166
setFilePathToCallOptions(eslintCallOptions, file);

lib/src/main/java/com/diffplug/spotless/npm/PrettierFormatterStep.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
*/
1616
package com.diffplug.spotless.npm;
1717

18-
import static com.diffplug.spotless.LazyArgLogger.lazy;
1918
import static java.util.Objects.requireNonNull;
2019

2120
import java.io.File;
@@ -120,8 +119,6 @@ public PrettierFilePathPassingFormatterFunc(String prettierConfigOptions, Pretti
120119

121120
@Override
122121
public String applyWithFile(String unix, File file) throws Exception {
123-
logger.info("formatting String '{}[...]' in file '{}'", lazy(() -> unix.substring(0, Math.min(50, unix.length()))), file);
124-
125122
final String prettierConfigOptionsWithFilepath = assertFilepathInConfigOptions(file);
126123
try {
127124
return restService.format(unix, prettierConfigOptionsWithFilepath);

lib/src/main/java/com/diffplug/spotless/npm/ShadowCopy.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,10 @@ public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IO
146146
Files.createLink(target.toPath().resolve(orig.toPath().relativize(file)), file);
147147
return super.visitFile(file, attrs);
148148
} catch (UnsupportedOperationException | SecurityException | FileSystemException e) {
149-
logger.info("Shadow copy entry does not support hard links: {}. Switching to copy.", file, e);
149+
logger.debug("Shadow copy entry does not support hard links: {}. Switching to 'copy'.", file, e);
150150
tryHardLink = false; // remember that hard links are not supported
151151
} catch (IOException e) {
152-
logger.info("Shadow copy entry failed to create hard link: {}. Switching to copy.", file, e);
152+
logger.debug("Shadow copy entry failed to create hard link: {}. Switching to 'copy'.", file, e);
153153
tryHardLink = false; // remember that hard links are not supported
154154
}
155155
}

0 commit comments

Comments
 (0)