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

DataBiosphere / consent / #4620

04 Oct 2023 01:36PM UTC coverage: 76.15% (-0.02%) from 76.167%
#4620

push

web-flow
[DUOS-2682][risk=no] Unicode fix for DAR Data queries (#2156)

9384 of 12323 relevant lines covered (76.15%)

0.76 hits per line

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

68.75
/src/main/java/org/broadinstitute/consent/http/util/ConsentLogger.java
1
package org.broadinstitute.consent.http.util;
2

3
import io.sentry.Sentry;
4
import io.sentry.SentryEvent;
5
import org.slf4j.Logger;
6
import org.slf4j.LoggerFactory;
7

8
public interface ConsentLogger {
9

10
  @SuppressWarnings("rawtypes")
11
  default Logger getLogger(Class clazz) {
12
    return LoggerFactory.getLogger(clazz);
1✔
13
  }
14

15
  /**
16
   * Logs an exception to the console and to Sentry
17
   *
18
   * @param e Exception
19
   */
20
  default void logException(Exception e) {
21
    getLogger(this.getClass()).error(e.getMessage());
1✔
22
    Sentry.captureEvent(new SentryEvent(e));
1✔
23
  }
1✔
24

25
  /**
26
   * Logs a throwable to the console and to Sentry
27
   *
28
   * @param t Throwable
29
   */
30
  default void logThrowable(Throwable t) {
31
    getLogger(this.getClass()).error(t.getMessage());
×
32
    Sentry.captureEvent(new SentryEvent(t));
×
33
  }
×
34

35
  /**
36
   * Logs a message and exception to the console and to Sentry
37
   *
38
   * @param message The message
39
   * @param e       Exception
40
   */
41
  default void logException(String message, Exception e) {
42
    getLogger(this.getClass()).error(message + e.getMessage());
1✔
43
    Sentry.captureEvent(new SentryEvent(e));
1✔
44
  }
1✔
45

46
  /**
47
   * Logs a warning message to the console
48
   *
49
   * @param message Error Message
50
   */
51
  default void logWarn(String message) {
52
    getLogger(this.getClass()).warn(message);
1✔
53
  }
1✔
54

55
  /**
56
   * Logs an info message to the console
57
   *
58
   * @param message Error Message
59
   */
60
  default void logInfo(String message) {
61
    getLogger(this.getClass()).info(message);
×
62
  }
×
63

64
  /**
65
   * Logs a debug message to the console
66
   *
67
   * @param message Error Message
68
   */
69
  default void logDebug(String message) {
70
    getLogger(this.getClass()).debug(message);
1✔
71
  }
1✔
72
}
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