경고등급
2026년 6월 5일 09:30분
신명기 4장에서 우상 숭배, 율법 수정, 망각에 대한 경고가 등급별로 발령됩니다. 심각도에 따라 다른 대응이 필요합니다. 나는 경고 유형과 심각도 등급을 정의하고 등급에 따라 대응을 출력하는 경보기를 만들었습니다.
package com.jesusbornd.deuteronomy;
import java.util.List;
public class Deuteronomy_04_Chapter_Lv1 {
enum Level { INFO, WARN, ERROR, CRITICAL }
record Warning(String cause, Level level) {}
static void alert(Warning w) {
String action = switch (w.level()) {
case INFO -> "기록만 함";
case WARN -> "주의 권고";
case ERROR -> "즉시 회개 요청";
case CRITICAL -> "🚨 심판 경고 발령";
};
System.out.printf("[%8s] %s → %s%n", w.level(), w.cause(), action);
}
public static void main(String[] args) {
List.of(
new Warning("율법 조항 추가", Level.ERROR),
new Warning("율법 조항 삭제", Level.ERROR),
new Warning("우상 제조", Level.CRITICAL),
new Warning("광야 경험 망각", Level.WARN)
).forEach(Deuteronomy_04_Chapter_Lv1::alert);
}
}
ACTIONS = {
"INFO": "기록만 함",
"WARN": "주의 권고",
"ERROR": "즉시 회개 요청",
"CRITICAL": "🚨 심판 경고 발령",
}
warnings = [
("율법 조항 추가", "ERROR"),
("율법 조항 삭제", "ERROR"),
("우상 제조", "CRITICAL"),
("광야 경험 망각", "WARN"),
]
if __name__ == "__main__":
for cause, level in warnings:
print(f"[{level:>8}] {cause} → {ACTIONS[level]}")
Search
Categories
← 목록으로
Comments
경고 등급을 명확히 정의해두면 대응 속도가 달라지는군요.