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

FIWARE / trusted-issuers-list / 100

01 Oct 2026 10:56AM UTC coverage: 88.017% (+0.4%) from 87.654%
100

Pull #29

github

vramperez
Name the issuer of a conflict, stack traces of rejected requests on debug

- A conflict is logged as "Issuer <did> already exists, rejected <method>
  <uri> with 409": for POST /issuer the uri carries no DID, so the line did not
  say which issuer collided
- An invalid request (400), including the ones micronaut rejects itself, is
  one WARN line with the reason; its stack trace moved to DEBUG, as for 409.
  These are client errors any caller can trigger, a ~100 line trace at WARN for
  each would let a single client flood the log

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Pull Request #29: Make log output configurable and log every request

163 of 209 branches covered (77.99%)

Branch coverage included in aggregate %.

57 of 68 new or added lines in 11 files covered. (83.82%)

1 existing line in 1 file now uncovered.

689 of 759 relevant lines covered (90.78%)

0.91 hits per line

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

0.0
/src/main/java/org/fiware/iam/Application.java
1
/*
2
 * Copyright 2023 FIWARE Foundation e.V. and/or its affiliates
3
 * and other contributors as indicated by the @author tags.
4
 *
5
 * Licensed under the Apache License, Version 2.0 (the "License");
6
 * you may not use this file except in compliance with the License.
7
 * You may obtain a copy of the License at
8
 *
9
 * http://www.apache.org/licenses/LICENSE-2.0
10
 *
11
 * Unless required by applicable law or agreed to in writing, software
12
 * distributed under the License is distributed on an "AS IS" BASIS,
13
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
 * See the License for the specific language governing permissions and
15
 * limitations under the License.
16
 */
17
package org.fiware.iam;
18

19
import io.micronaut.runtime.Micronaut;
20
import java.util.Map;
21
import liquibase.Scope;
22
import liquibase.ui.LoggerUIService;
23
import org.slf4j.bridge.SLF4JBridgeHandler;
24

25
public class Application {
×
26

27
  /** Liquibase setting that decides where the update summary is written to. */
28
  private static final String LIQUIBASE_SUMMARY_OUTPUT = "liquibase.command.showSummaryOutput";
29

30
  /** Write the update summary to the log instead of stdout. */
31
  private static final String LIQUIBASE_SUMMARY_TO_LOG = "LOG";
32

33
  /** Environment variable selecting the log output, see logback.xml. */
34
  private static final String LOG_FORMAT = "LOG_FORMAT";
35

36
  /** Log output as one JSON object per line. */
37
  private static final String LOG_FORMAT_JSON = "JSON";
38

39
  public static void main(String[] args) throws Exception {
40

41
    SLF4JBridgeHandler.removeHandlersForRootLogger();
×
42
    SLF4JBridgeHandler.install();
×
43

44
    // liquibase prints the applied change sets and its update summary directly to stdout, bypassing
45
    // the log format (and breaking JSON output). Both are routed through the "liquibase" logger
46
    // instead: the migrations run on this thread during startup, so a scope with a logging UI
47
    // applies to them. An explicitly configured summary output is kept.
NEW
48
    Scope.enter(Map.of(Scope.Attr.ui.name(), new LoggerUIService()));
×
NEW
49
    if (System.getProperty(LIQUIBASE_SUMMARY_OUTPUT) == null) {
×
NEW
50
      System.setProperty(LIQUIBASE_SUMMARY_OUTPUT, LIQUIBASE_SUMMARY_TO_LOG);
×
51
    }
52

53
    // the ascii banner would be the only output that is not a JSON line
NEW
54
    boolean jsonLogging = LOG_FORMAT_JSON.equals(System.getenv(LOG_FORMAT));
×
NEW
55
    Micronaut.build(args).mainClass(Application.class).banner(!jsonLogging).start();
×
UNCOV
56
  }
×
57
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc