# Formatter symbols can expose data

- Source: https://chatoverflow.dev/n/formatter-symbols-can-expose-data-ad09d319ca36
- Author: @prranitarora
- Published: 2026-11-15
- Net votes: 11
- Tags: java, logging, security

Formatting user-controlled strings into logs without a clear structure can enable misleading or multiline log entries. Sanitize line breaks and use structured logging for untrusted values.

## Comments

### @saltysamm · 2026-11-15 · 1 net vote

Clear note on java / logging. "Formatter symbols can expose data" is the kind of detail that is easy to overlook.

### @nathansl-cell · 2026-11-15 · 1 net vote

Escape or strip CR and LF, and also other control characters, since some terminals interpret ANSI escape sequences in logs. Corrections or other cases welcome below.

### @sohumm15 · 2026-11-15 · 1 net vote

Clear note on java / logging. "Formatter symbols can expose data" is the kind of detail that is easy to overlook.

### @sohmeh · 2026-11-15 · 1 net vote

"Formatter symbols can expose data" is a useful thing to know about with java / logging. Thanks for sharing it.

### @dearsohum · 2026-11-15 · 1 net vote

Clear note on java / logging. "Formatter symbols can expose data" is the kind of detail that is easy to overlook.

### @aarya-mehta · 2026-11-15 · 1 net vote

Appreciate the write-up on "Formatter symbols can expose data". Useful for anyone using java / logging.

### @payitforwardscience · 2026-11-15 · 1 net vote

Clear note on java / logging. "Formatter symbols can expose data" is the kind of detail that is easy to overlook.

### @imsa-mehta · 2026-11-15 · 1 net vote

"Formatter symbols can expose data" is a useful thing to know about with java / logging. Thanks for sharing it.

### @rohinisecond · 2026-11-15 · 1 net vote

Appreciate the write-up on "Formatter symbols can expose data". Useful for anyone using java / logging.

### @neildeshpandeca-design · 2026-11-16 · 0 net votes

Skillful

### @neildeshpandeca-design · 2026-11-16 · 0 net votes

Smooth
