Exposes a property affecting run-mode determination, for customisation.
Exposes a property affecting run-mode determination, for customisation. If the property is modified after the run-mode is realised, then it will have no effect and will instead log a warning indicating thus.
Enumeration of available run modes.
Updates Props to find values in the argument when interpolating values found in providers.
Updates Props to find values in the argument when interpolating values found in providers.
You can only modify these BEFORE you look up any props!
Updates Props to find property values in the argument AFTER first looking in the standard Lift prop files.
Updates Props to find property values in the argument AFTER first looking in the standard Lift prop files.
Arbitrary map of property key -> property value.
You can only modify these BEFORE you look up any props!
When the run.mode
environment variable isn't set or recognised, this function is invoked to determine the
appropriate mode to use.
When the run.mode
environment variable isn't set or recognised, this function is invoked to determine the
appropriate mode to use.
This logic can be customised by calling set
before the run-mode is
referenced. (An attempt to customise this after the run-mode is realised
will have no effect and will instead log a warning.)
Debug a Failure
.
Debug a Failure
. If the log level is debug and the Box
is a
Failure
, debug the message concatenated with the Failure
's message. If
the Failure
contains an Exception
, debug that as well.
Is the system running in development mode
Is the system running in development mode
The default run-mode auto-detection routine uses this function to infer whether Lift is being run in a test.
The default run-mode auto-detection routine uses this function to infer whether Lift is being run in a test.
This routine can be customised by calling set
before the run-mode
is referenced. (An attempt to customise this after the run-mode is
realised will have no effect and will instead log a warning.)
Error a Failure
.
Error a Failure
. If the log level is error and the Box
is a Failure
,
error the message concatenated with the Failure
's message. If the
Failure
contains an Exception
, error that as well.
Get the configuration property value for the specified key.
Get the configuration property value for the specified key.
key for the property to get
the value of the property if defined
The resource path segment corresponding to the system hostname.
The resource path segment corresponding to the system hostname.
Is the app running in the Google App engine (the System property in.gae.j is set)
Is the app running in the Google App engine (the System property in.gae.j is set)
Info a Failure
.
Info a Failure
. If the log level is info and the Box
is a Failure
,
info the message concatenated with the Failure
's message. If the
Failure
contains an Exception
, info that as well.
The mode for which to retrieve properties, retrieved by System.getProperty("run.mode").
The mode for which to retrieve properties, retrieved by System.getProperty("run.mode"). Recognized modes are "development", "test", "profile", "pilot", "staging" and "production" with the default run mode being development.
The resource path segment corresponding to the current mode.
The resource path segment corresponding to the current mode.
Updates Props to find property values in the argument BEFORE looking in the standard Lift prop files.
Updates Props to find property values in the argument BEFORE looking in the standard Lift prop files.
Arbitrary map of property key -> property value to be used for property lookup.
You can only modify these BEFORE you look up any props!
Is the system running in production mode (apply full optimizations)
Is the system running in production mode (apply full optimizations)
The map of key/value pairs retrieved from the property file.
The map of key/value pairs retrieved from the property file.
Determine whether the specified properties exist.
Determine whether the specified properties exist.
the properties to test
the subset of strings in 'what' that do not correspond to keys for available properties.
Ensure that all of the specified properties exist; throw an exception if any of the specified values are not keys for available properties.
Ensure that all of the specified properties exist; throw an exception if any of the specified values are not keys for available properties.
Is the system running in test mode
Is the system running in test mode
The list of paths to search for property file resources.
The list of paths to search for property file resources. Properties files may be found at either the classpath root or in /props
Trace a Failure
.
Log the value of v with trace and return v.
Log the value of v with trace and return v. Useful for tracing values in expressions
Passes the current InterpolationValues
s to the passed updater
, then sets the
providers to the result of the updater.
Passes the current InterpolationValues
s to the passed updater
, then sets the
providers to the result of the updater. Consider using
appendInterpolationValues
instead.
Function that gets the current InterpolationValues
s and returns
the new ones to use.
You can only modify these BEFORE you look up any props!
Passes the current PropProvider
s to the passed updater
, then sets the
providers to the result of the updater.
Passes the current PropProvider
s to the passed updater
, then sets the
providers to the result of the updater. Consider using
appendProvider
or prependProvider
instead.
Function that gets the current PropProvider
s and returns
the new ones to use.
You can only modify these BEFORE you look up any props!
The resource path segment corresponding to the current system user (from System.getProperty("user.name"))
The resource path segment corresponding to the current system user (from System.getProperty("user.name"))
Warn a Failure
.
Warn a Failure
. If the log level is warn and the Box
is a Failure
,
warn the message concatenated with the Failure
's message. If the
Failure
contains an Exception
, warn that as well.
This is a function that returns the first places to look for a props file.
This is a function that returns the first places to look for a props file.
The function returns a List of String -> () => Box[InputStream].
So, if you want to consult System.getProperties to look for a properties file or
some such, you can set the whereToLook function in your Boot.scala file
before you call anything else in Props
.
Configuration management utilities.
If you want to provide a configuration file for a subset of your application or for a specific environment, Lift expects configuration files to be named in a manner relating to the context in which they are being used. The standard name format is:
with
hostName
anduserName
being optional, andmodeName
being one of "test", "staging", "production", "pilot", "profile", or "default". The standard Lift properties file extension is "props".