configuration - Typesafe config secure rendeing -


i have following code

log(config.render()) 

however if have passwords in config they'll appear in log. there easy way eliminate this? looking that

log(config.map { if ("password" in it.key.tolowercase()) "***" else it.value }     .render()) 

for clear solution this

val contenthiddenvalue = configvaluefactory.fromanyref("***", "content hidden") log.info(config.root()         .withoutkey("security")         .withvalue("security", contenthiddenvalue)         .render()) 

the obvious disadvantage hides exact config subtree


Comments

Popular posts from this blog

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -