Java security engineering
Log a bounded audit outcome
The output contains no user ID, raw resource identifier or credential. Production audit requirements may require protected pseudonymous identifiers and retention controls.
Formal Syntax & Structure
java syntaxjava
event(outcome)Working Example
Example Snippetjava
public class Main { static String event(String outcome) { if(!java.util.Set.of("allowed","denied").contains(outcome)) throw new IllegalArgumentException("outcome"); return "event=document_read outcome="+outcome; } public static void main(String[] args) throws Exception { System.out.println(event("denied")); }}