Skip to content
paradigmatic edited this page Jul 11, 2011 · 3 revisions

System properties and environment variables

Configurations can be created from the current system properties or the environement variables:

val sysProp = Configuration.systemProperties
val sep = sysProp[String]("line.separator") // sep == "\n"
val env = Configuration.environment
val homeDir = env("HOME", "/tmp") // home == "/home/paradigmatic"

Pretty printing

A configuration can be exported to a nice string, by using the method format:

val env = Configuration.environment
println( env format myFmt )

where myFmt is an instance of type ExportFormat. This argument is optional, if ommitted BlockFormat will be used by default.

Clone this wiki locally