Skip to content

Commit

Permalink
adding classes to import to avoid FQDNS for Logger and Level
Browse files Browse the repository at this point in the history
Signed-off-by: Alfredo Gutierrez <[email protected]>
  • Loading branch information
AlfredoG87 committed Aug 23, 2024
1 parent ed602be commit 7b0010f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
import io.helidon.webserver.grpc.GrpcRouting;
import io.helidon.webserver.http.HttpRouting;
import java.io.IOException;
import java.lang.System.Logger;
import java.lang.System.Logger.Level;
import javax.inject.Inject;
import javax.inject.Singleton;

Expand All @@ -45,7 +47,7 @@
@Singleton
public class BlockNodeApp {

private static final System.Logger LOGGER = System.getLogger(BlockNodeApp.class.getName());
private static final Logger LOGGER = System.getLogger(BlockNodeApp.class.getName());

Check warning on line 50 in server/src/main/java/com/hedera/block/server/BlockNodeApp.java

View check run for this annotation

Codecov / codecov/patch

server/src/main/java/com/hedera/block/server/BlockNodeApp.java#L50

Added line #L50 was not covered by tests
private final ServiceStatus serviceStatus;
private final HealthService healthService;
private final BlockNodeContext blockNodeContext;
Expand Down Expand Up @@ -112,7 +114,7 @@ public void startServer() throws IOException {

// Log the server status
LOGGER.log(

Check warning on line 116 in server/src/main/java/com/hedera/block/server/BlockNodeApp.java

View check run for this annotation

Codecov / codecov/patch

server/src/main/java/com/hedera/block/server/BlockNodeApp.java#L116

Added line #L116 was not covered by tests
System.Logger.Level.INFO,
Level.INFO,
String.format("Block Node Server started at port: %d", webServer.port()));
}

Check warning on line 119 in server/src/main/java/com/hedera/block/server/BlockNodeApp.java

View check run for this annotation

Codecov / codecov/patch

server/src/main/java/com/hedera/block/server/BlockNodeApp.java#L118-L119

Added lines #L118 - L119 were not covered by tests

Expand Down
6 changes: 4 additions & 2 deletions server/src/main/java/com/hedera/block/server/Server.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@

import edu.umd.cs.findbugs.annotations.NonNull;
import java.io.IOException;
import java.lang.System.Logger;
import java.lang.System.Logger.Level;

/** Main class for the block node server */
public class Server {

private static final System.Logger LOGGER = System.getLogger(Server.class.getName());
private static final Logger LOGGER = System.getLogger(Server.class.getName());

private Server() {}

Expand All @@ -34,7 +36,7 @@ private Server() {}
*/
public static void main(final String[] args) throws IOException {

LOGGER.log(System.Logger.Level.INFO, "Starting BlockNode Server");
LOGGER.log(Level.INFO, "Starting BlockNode Server");

@NonNull
final BlockNodeAppInjectionComponent daggerComponent =
Expand Down

0 comments on commit 7b0010f

Please sign in to comment.