계: Encapsulation

캡슐화는 강력한 경계를 그리는 것입니다. 웹 브라우저에서는 사용자의 모바일 코드가 다른 모바일 코드에 의해 오용되지 않도록 하는 것을 의미합니다. 서버에서는 검증된 데이터와 검증되지 않은 데이터, 한 사용자의 데이터와 다른 사용자의 데이터, 데이터 사용자가 볼 수 있는 데이터와 볼 수 없는 데이터 간의 차별화를 의미할 수 있습니다.

Poor Logging Practice: Multiple Loggers

Abstract
한 클래스에 multiple loggers 대신 로깅 수준(logging level)을 사용합니다.
Explanation
좋은 로깅 습관은 각 클래스마다 하나의 로거를 사용하는 것입니다.

예제 1: 다음 코드는 multiple loggers를 선언하는 오류를 범합니다.


public class MyClass {
private final static Logger good =
Logger.getLogger(MyClass.class);
private final static Logger bad =
Logger.getLogger(MyClass.class);
private final static Logger ugly =
Logger.getLogger(MyClass.class);
...
}
References
[1] Standards Mapping - Common Weakness Enumeration CWE ID 398
[2] Standards Mapping - DISA Control Correlation Identifier Version 2 CCI-000154
[3] Standards Mapping - FIPS200 AU
[4] Standards Mapping - NIST Special Publication 800-53 Revision 4 AU-6 Audit Review and Analysis and Reporting (P1)
[5] Standards Mapping - NIST Special Publication 800-53 Revision 5 AU-6 Audit Record Review and Analysis and Reporting
[6] Standards Mapping - Security Technical Implementation Guide Version 5.3 APSC-DV-001130 CAT II
[7] Standards Mapping - Security Technical Implementation Guide Version 6.1 APSC-DV-001130 CAT II
desc.structural.java.poor_logging_practice_multiple_loggers