Envjs provides a number of basic configurable options which allow users to modify the default behavior the code base.
Options, Hooks, and Platform functions are all set, or overridden via the same mechanism, using Envjs as a function whose argument as an object is used to effectively replace the default value.
Sets the verbosity of the log messages produced by Envjs Allowed values are NONE, ERROR, WARN, INFO, and DEBUG
logger level root 'ERROR'
Sets value which is returned as part of window.navigator.appVersion In Firefox on OSX this is '5.0 (Macintosh; en-US)'
default (rhino): java.lang.System.getProperty('os.name')
Hooks allow users of Envjs to extend the usual behavior at well known points, or to subscribe to internal events that a browser would not normally expose.
These are very useful, for example, to allow Envjs users to run existing HTML files unmodified, while still being able to provide additional information to the console, or to store state regarding the HTML applications processes.
Allows the platform to define a method to provide standard output. Expects a string argument and returns nothing.
env.rhino.js provides an implementation that uses the global Rhino print function. Users that prefer a different outputformat or want to write logs to a file can override this function.