• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

devonfw / IDEasy / 15073527561

16 May 2025 04:57PM UTC coverage: 67.608% (-0.1%) from 67.707%
15073527561

Pull #1318

github

web-flow
Merge 16baa64fa into 5e3c8fc69
Pull Request #1318: #1314: add IdeContext.runWithoutLogging to temporary disable logging

3104 of 5000 branches covered (62.08%)

Branch coverage included in aggregate %.

7983 of 11399 relevant lines covered (70.03%)

3.06 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

81.82
cli/src/main/java/com/devonfw/tools/ide/log/IdeLogListenerCollector.java
1
package com.devonfw.tools.ide.log;
2

3
import java.util.ArrayList;
4
import java.util.List;
5

6
/**
7
 * Implementation of {@link IdeLogListener} that collects all events as {@link IdeLogEntry}.
8
 */
9
public class IdeLogListenerCollector implements IdeLogListener {
10

11
  protected final List<IdeLogEntry> entries;
12

13
  protected IdeLogLevel threshold;
14

15
  /**
16
   * The constructor.
17
   */
18
  public IdeLogListenerCollector() {
19
    super();
2✔
20
    this.entries = new ArrayList<>(512);
6✔
21
    this.threshold = IdeLogLevel.TRACE;
3✔
22
  }
1✔
23

24
  /**
25
   * @return the {@link List} of {@link IdeLogEntry} that have been logged for test assertions.
26
   */
27
  public List<IdeLogEntry> getEntries() {
28

29
    return this.entries;
3✔
30
  }
31

32
  @Override
33
  public boolean onLog(IdeLogLevel level, String message, String rawMessage, Object[] args, Throwable error) {
34
    if (level.ordinal() >= threshold.ordinal()) {
6!
35
      this.entries.add(new IdeLogEntry(level, message, rawMessage, args, error));
12✔
36
    }
37
    return true;
2✔
38
  }
39

40
  /**
41
   * @return {@code true} if this collector is active and collects all logs, {@code false} otherwise (disabled and no filtering of logs so regular logging).
42
   */
43
  protected boolean isActive() {
44
    return true;
×
45
  }
46
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc