Package org.daiitech.naftah.utils.script
Class NaftahLogFormatter
java.lang.Object
java.util.logging.Formatter
org.daiitech.naftah.utils.script.NaftahLogFormatter
A custom log formatter that supports reshaping text for proper visual display
in logging output. If text is detected and reshaping is enabled, the formatter
will reshape the text before logging it. Otherwise, the original message is logged.
Note: Actual implementations of shape(), containsArabicLetters(String),
and shouldReshape() are assumed to exist elsewhere in the codebase.
- Author:
- Chakib Daii
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.util.logging.Formatter
formatMessage, getHead, getTail
-
Field Details
-
LOG_MSG
Template for the formatted log message. It includes the log level and the message itself.- See Also:
-
-
Constructor Details
-
NaftahLogFormatter
public NaftahLogFormatter()
-
-
Method Details
-
format
Formats a givenLogRecordby checking if the message contains text. If so, and reshaping is enabled, the message will be reshaped for visual rendering. If reshaping fails or is not required, the original message is logged.
-