001package org.hl7.fhir.r5.context;
002
003import lombok.RequiredArgsConstructor;
004
005@RequiredArgsConstructor
006public class SystemOutLoggingService implements ILoggingService {
007
008  private final boolean debug;
009
010  public SystemOutLoggingService() {
011    this(false);
012  }
013
014  @Override
015  public void logMessage(String message) {
016    System.out.println(message);
017  }
018
019  @Override
020  public void logDebugMessage(LogCategory category, String message) {
021    if (debug) {
022      System.out.println(" -" + category.name().toLowerCase() + ": " + message);
023    }
024  }
025
026  @Override
027  public boolean isDebugLogging() {
028    return debug;
029  }  
030  
031}