Note that there are some explanatory texts on larger screens.

plurals
  1. POHandling line replacements in headless mode
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. COQuestion 1: What do you mean by "logging"? Logging is already headless when done by the java.util.logging package. Question 2: Why are you using a StyledDocument? Are your log messages not plain text? Are you aware that a JTextArea uses a PlainDocument and does not show any styles? Question 3: You mention carriage returns, but your code is checking for `"\b"`, which is a backspace character. Is this intentional? Question 4: What does "universally handle Carriage Returns" mean? Question 5: When you say "convert it to just use a String" what does "it" refer to?
      singulars
    2. COOk, so basically, i'm trying to reform my current UI API, which sucks balls. My logging class routes information to various parts of the application including the UI. What I need is a way to attach an event listener to a string or some sort of object that will plug in to a JTextArea as easily as as a Commandline UI, or a JFXML UI, or even a Headless UI. I need a way to have the UI monitor some string data.
      singulars
    3. COA String is immutable, so String will never permit adding a listener to it (since its state never changes). It sounds like you need an `addLogEventListener` method in your logging code, or possibly even an [addHandler](http://docs.oracle.com/javase/7/docs/api/java/util/logging/Logger.html#addHandler%28java.util.logging.Handler%29) method. The actual handler/listener should call JTextArea.append from within a Runnable passed to `EventQueue.invokeLater`. A non-Swing handler/listener might just call BufferedWriter.write.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload