Skip to content

Commit f30abd8

Browse files
authored
feat: Make logging more configurable (#234)
1 parent 6dcb762 commit f30abd8

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

utam-compiler/src/main/java/utam/compiler/lint/LintingConfigJson.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ public void finish(LintingContext context) {
135135
List<PageObjectLinting> all = context.getAllPageObjects();
136136
for (int i = 0; i < all.size(); i++) {
137137
PageObjectLinting first = all.get(i);
138+
UtamLogger.info(String.format("finish linting for %s", first.getJsonFilePath()));
138139
for (int j = i + 1; j < all.size(); j++) {
139140
PageObjectLinting second = all.get(j);
140141
for (LintingRuleImpl rule : globalRules) {

utam-core/src/main/java/utam/core/framework/UtamLogger.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,11 @@ public class UtamLogger {
2626
* formatting log messages.
2727
*/
2828
static {
29-
System.setProperty(
30-
"java.util.logging.SimpleFormatter.format", "%1$tT %3$s %4$-7s: %5$s %6$s%n");
29+
String format = System.getProperty("java.util.logging.SimpleFormatter.format");
30+
if (format == null) {
31+
System.setProperty(
32+
"java.util.logging.SimpleFormatter.format", "%1$tT %3$s %4$-7s: %5$s %6$s%n");
33+
}
3134
UTAM_LOGGER = LoggerFactory.getLogger("utam");
3235
}
3336

0 commit comments

Comments
 (0)