powered by Jive Software

How to change line.separator from '\r' to ' \r\n'


#1

How does one change Openfire’s ‘line.separator’ from the default Unix format (i.e. ‘\r’) to the Windows format (i.e. ’ \r\n’) from within the Openfire web Admin Console or from CMD.exe?

More on this ‘Java System Properties’ can be found at: https://igniterealtime.jiveon.com/docs/DOC-1061#java_prop

Regards,
Cosmo Kramer


#2

Out of curiosity, what issue are you attempting to address with this change?


#3

As Openfire doesn’t save the Peer-2-Peer sent stanza’s into a database, I’m creating a PowerShell Regular Expression script that uses the ‘Get-Contents -Tail 0 -Path …’ command that reads the last entered line of the enabled Openfire Audit log file in real time and then inserts this collected stanza data into a database.

However, due to the ‘line.separator’ setting being ‘\r’ on my Windows Chat server, the entire file is one long line, which prevents me from achieved my desired script logic.

I could read in the entire file and them perform a RegEx on the contents to change the end-of-line characters over, but on a repeatable basis, this would not be very efficient. Furthermore, there are some other hidden characters in this file (e.g. ‘\f’ -> a form feed) which also is screwing up my script processing.

Rather then developing this script as a work-about, would you know of a proper Openfire GUI method that provides this P-2-P stanza database archival functionality?


#4

you would need to modify the startup script to pass the line.separtor as a JVM flag -D


#5

Would you mind providing me with a URL or steps on how to perform this task?