Class BlurIPsMutator
java.lang.Object
de.craftsblock.craftsnet.logging.mutate.builtin.BlurIPsMutator
- All Implemented Interfaces:
LogStreamMutator
A built-in
LogStreamMutator that blurs or censors IP addresses in log lines.
This mutator checks the CraftsNetBuilder.shouldHideIps() setting in the
CraftsNet builder and, if enabled, replaces all
IP addresses in the output with a masked version.
Useful for privacy-sensitive environments such as public log files or shared infrastructure.
- Since:
- 3.5.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
BlurIPsMutator
public BlurIPsMutator()
-
-
Method Details
-
mutate
@NotNull public @NotNull String mutate(@NotNull @NotNull LogStream logStream, @NotNull @NotNull String line) Mutates the log line blurring the line if it is enabled.- Specified by:
mutatein interfaceLogStreamMutator- Parameters:
logStream- TheLogStreamthat produced the original log line.line- The original log line.- Returns:
- The mutated log line.
-