package SuMoC.backend.logger; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; @Controller public class LogPageController { @GetMapping("/logs") public String logs(Model model) throws IOException { String content = Files.readString(Path.of("logs/app.log")); model.addAttribute("logs", content); return "logs"; } }