-
Notifications
You must be signed in to change notification settings - Fork 14
Description
When using the jproperties utility to update the existing properties file. All of the comments in properties files are converting from multiline comments to a single line comment.
Input File:
# logs XML being signed or verified if set to DEBUG
log4j.category.XMLTooling.Signature.Debugger=INFO, sig_log
log4j.additivity.XMLTooling.Signature.Debugger=false
log4j.ownAppenders.XMLTooling.Signature.Debugger=true# the tran log blocks the "default" appender(s) at runtime
# Level should be left at INFO for this category
log4j.category.Shibboleth-TRANSACTION=INFO, tran_log
log4j.additivity.Shibboleth-TRANSACTION=false
log4j.ownAppenders.Shibboleth-TRANSACTION=true# uncomment to suppress particular event types
#log4j.category.Shibboleth-TRANSACTION.AuthnRequest=WARN
#log4j.category.Shibboleth-TRANSACTION.Login=WARN
#log4j.category.Shibboleth-TRANSACTION.Logout=WARN# define the appenders
log4j.appender.shibd_log=org.apache.log4j.RollingFileAppender
log4j.appender.shibd_log.fileName=/var/log/shibboleth/shibd.log
and the Output file is:
log4j.category.XMLTooling.Signature.Debugger=INFO, sig_log
log4j.additivity.XMLTooling.Signature.Debugger=false
#: _doc=the tran log blocks the "default" appender(s) at runtime\nLevel should be left at INFO for this category\n
log4j.ownAppenders.XMLTooling.Signature.Debugger=true
log4j.category.Shibboleth-TRANSACTION=INFO, tran_log
log4j.additivity.Shibboleth-TRANSACTION=false
#: _doc=uncomment to suppress particular event types\nlog4j.category.Shibboleth-TRANSACTION.AuthnRequest=WARN\nlog4j.category.Shibboleth-TRANSACTION.Login=WARN\nlog4j.category.Shibboleth-TRANSACTION.Logout=WARN\ndefine the appenders\n
log4j.ownAppenders.Shibboleth-TRANSACTION=true
log4j.appender.shibd_log=org.apache.log4j.RollingFileAppender
log4j.appender.shibd_log.fileName=/var/log/shibboleth/shibd.log
In output file following things are being messed up
- The order of the properties in the file is being shuffled to random.
- Multiline comments are converted into single line comments which are completely different from original file. The multiline comments must remain the same.
Is there any way to make sure the resolution of above points?