CWMS Client applications utilize the Java Util Logging framework to provide various levels of information to the end user, reporting on the execution of the application. The logged messages are output to handlers which are implemented as log files on the client file system, messages in the console window, and, in the case of the CAVI, in a dedicated Messages tab. Detailed documentation on the logging framework can be found here: https://docs.oracle.com/en/java/javase/11/core/java-logging-overview.html.

Properties File Configuration

The Java Util Logging framework provides the ability to tune how verbose the logged messages should get broadcast to those handlers using a Java Properties file named logging.properties. In each of the application executables' config files (ex. CAVI.config) there is a line vmparam -Djava.util.logging.config.file  that specifies the location of the properties file.

The CWMS client distribution bundle contains default properties files with the log levels targeted for end user informational messages. When issues arise, the HEC production support team will generally ask for logs to be set to debug levels and will provide the client with an updated properties file targeting specific pieces of the software to help diagnose the cause of the issue. Whenever this happens, it is important to retain the original properties file in order to revert back to default logging levels.

CAVI

The CAVI.config by default points the logging properties file to the default configuration under <cwms installer>/CAVI/config/properties/logging.properties. If the client has a personal config setup (defined by the line in the CAVI.config  file include $APPDATA\CWMS\PersonalConfigs\CAVI-Personal.config) to override that default location, make sure the correct properties file gets updated. A guide to set up a Personal Config is available here.

AppExe configConfiguration parameterDefault file location
CAVICAVI.configvmparam -Djava.util.logging.config.file<cwms installer>/CAVI/config/properties/logging.properties

Common Executables

The common executables under <cwms installer>/common/exe have a common executable configuration called ~common.config that contains the vmparam -Djava.util.logging.config.file property definition. By default this points to the file <cwms installer>/common/config/properties/logging.properties though can similarly be overridden through a personal config just like the CAVI.

AppExe configConfiguration parameterDefault file location

CWMSVue

ServerAdmin

DataExchange

DSSVue

ConfigEditor

Jython

LogFileViewer

~common.configvmparam -Djava.util.logging.config.file<cwms installer>/common/config/properties/logging.properties

Logging Properties Configuration

The logging.properties file contains properties that can fine tune how log messages are broadcast and handled. Levels on individual loggers can be configured to broadcast to the handlers, and handlers can be configured with the level of logs they are able to consume. Adjusting these levels requires knowledge of the relevant applications and the settings to tweak are provided by the HEC production support team. For further documentation see https://docs.oracle.com/cd/E57471_01/bigData.100/data_processing_bdd/src/rdp_logging_config.html

Logging levels

The logging level specifies the amount of information that is logged. The levels (in ascending order of verbosity) are:

  • SEVERE — Indicates a serious failure. In general, SEVERE messages describe events that are of considerable importance and which will prevent normal program execution.
  • WARNING — Indicates a potential problem. In general, WARNING messages describe events that will be of interest to end users or system managers, or which indicate potential problems.
  • INFO — A message level for informational messages. The INFO level should only be used for reasonably significant messages that will make sense to end users and system administrators.
  • CONFIG — A message level for static configuration messages. CONFIG messages are intended to provide a variety of static configuration information, and to assist in debugging problems that may be associated with particular configurations.
  • FINE — A message level providing tracing information. All options, FINE, FINER, and FINEST, are intended for relatively detailed tracing. Of these levels, FINE should be used for the lowest volume (and most important) tracing messages.
  • FINER — Indicates a fairly detailed tracing message.
  • FINEST — Indicates a highly detailed tracing message. FINEST should be used for the most voluminous detailed output.
  • ALL — Enables logging of all messages.


Make sure log levels are targeted to specific loggers. Messages at FINER and above will output large amounts of content.


"-D" Flag Options

Property NameInput Type (Boolean, String)ComponentDescriptionDefault setting in CAVI.config/Example
LooseVersionCheckBooleanCavi/Server JarsIf set true, will not compare all server jars' versions to client jars' versionsvmparam -DLooseVersionCheck=true
Disable.DbfFileHandlingBooleanCWMSIf set true, DBF files will not be uploaded to the servers.  This is needed because there is not a 64-bit codebase library that can be used on the servers.vmparam -DDisable.DbfFileHandling=true
LOGFILEStringCWMSThe file path to application's console/log filevmparam -DLOGFILE=$TEMP/logs/cavi.log
CACHE_DIRStringCWMSThe file path to the application's cache directoryvmparam -DCACHE_DIR=$APPDATA\CWMS\pythonCache
LogFileHasPidBooleanCWMS Allows multiple instances of CAVI running simultaneously to write unique log files, identified by the process ids.  Note - there will be a new log file each time CAVI is run.vmparam -DLogFileHasPid=false
DataSetValidParameterListFileStringCWMSFile location for the parameters_units.def vmparam -DDataSetValidParameterListFile=..\config\parameters_units.def
UNIT_FILEStringCWMSFile location of the unitConversions.def filevmparam -DUNIT_FILE=..\config\unitConversions.def
CWMS_HOMEStringCWMS CAVICWMS home directory locationvmparam -DCWMS_HOME=.
NoDxXsdValidationBooleanCWMSIf true, will not validate XML files vmparam -DNoDxXsdValidation=true
PLUGINSStringCWMSThe paths to be searched when finding plugins.vmparam -DPLUGINS=../shared/jar/ext;jar/ext
AsciiSerializer.formatFileBooleanCWMSIf set true, The ASCIISerializer will format and indent the files it writes.  The formatted files are more readable but also larger.vmparam -DAsciiSerializer.formatFile=true
CWMS_EXEStringCWMSFile path to the cavi.exe vmparam -DCWMS_EXE=..\
cwms.db.impl.classpathsStringCWMSFile path to the CWMS DBI Implvmparam -Dcwms.db.impl.classpaths=jar/cwmsDbApi/jooq
Teaming.CwmsServersBooleanCWMSWhen true, allows storage of a Team Watershed on the CWMS serversvmparam -DTeaming.CwmsServers=true
USE_TABBEDn/aCWMSWhen specified in the application's config file, the framework will use tabs instead of dropdowns for modulesvmparam -DUSE_TABBED
oracle.metrics.clientidStringCWMSUsed to identify which application is connecting to Oracle vmparam -Doracle.metrics.clientid="CWMS CAVI Connection"
cavi.netbeans.platformdirStringCWMSTurn on the CAVI Dashboard, location of Dashboard softwarevmparam -Dcavi.netbeans.platformdir=./module/Dashboard
UseEmbeddedDssVueBooleanCWMSWhen true, an embedded DSSVue is used instead of the installed version.vmparam -DUseEmbeddedDssVue=true
cwms.connection.persistBoolean CWMS When true, instructs the application to perform keep-alive pings on connections to the Oracle database. 

commented out in cavi.config file

vmparam -Dcwms.connection.persist=true

cwms.connection.recycle.secondsNumericCWMSAllow for non-default timing to be used for the keep-alive.  Controls how often the check for keep-alive occurs, it defaults to 300 seconds, 5 minutes. 

commented out in cavi.config file

vmparam -Dcwms.connection.recycle.seconds=300

cwms.connection.refresh.timeout.secondsNumericCWMSSets the maximum amount of time that will occur before an idle connection has a keep-alive performed.  This defaults to 150 seconds, 2.5 minutes.

commented out in cavi.config file

vmparam -Dcwms.connection.refresh.timeout.seconds=150

noServerSideSecurityBooleanCWMSWhen true, disables server side access control list checks for the RMI File Manager.
Needed on the controlling node for WAT Distributed Computes.

commented out in cavi.config file

vmparam -DnoServerSideSecurity=true

schedulerEntries.directoryStringCWMSLocation directory of CWMS scheduler filesvmparam -DschedulerEntries.directory=$APPDATA\CWMS\CAVI\scheduler
Login.hasPassword booleanCWMSWhen true, a password field is shown on the login dialog. When unspecified or false the login supports CAC only.vmparam -DLogin.hasPassword=true
Has2_1ImporterbooleanCWMSWhen set to true, the 2.1 Import option is enabled in the New Watershed dialogvmparam -DHas2_1Importer=false
Teaming.ShowDeleteNotificationbooleanCWMSWhen true, the deleted/removed messages will be displayed. The default behavior now is to hide all messages regarding deleted/removed files from the CAVI "Team" tab, the "purple pop-up" messages and the console output.vmparam -DTeaming.ShowDeleteNotification=false
OpenLastWatershedboolean

CWMS

When true, the last project by version (by editing the .config file) is open.  So for 3.1.1 they can load the last watershed,  but in 3.2 they can set the -D flag =false and it won't load the last watershed, there by avoiding having it converted to the latest version.

if its set to either true or false it overrides what the user selected in the Options dialog.    If its not in the config file at all (which is the default) then nothing changes.

vmparam -DOpenLastWatershed=true
regi.netbeans.platformdirStringREGI ToolsLocation of REGI Tools Netbeans platform directoryvmparam -Dregi.netbeans.platformdir=jar/regitools/regitoolsparent
hec.data.cwmsRating.RatingSet.databaseLoadMethodStrings; EAGER, LAZY, and REFRENCERatings

Sets a global behavior for the rating's database retrieval:

EAGER: retrieve all of the rating curves from the database

LAZY: only retrieve the rating curves from the database when they are needed (default setting)

REFERENCE: retrieve no rating curves from the database and instead perform all operations using the DB Ratings API.

vmparam -Dhec.data.cwmsRating.RatingSet.databaseLoadMethod=eager
COLLECTIONn/aDSSWhen specified the DSS collections data features are enabledvmparam -DCOLLECTION
scripts.directoryStringCWMSVue/DSSVueDssVue and CWMSVue script file locations (in CAVI.config)vmparam -Dscripts.directory=$APPDATA/HEC/HEC-DSSVue/scripts
MonitorEDTbooleanCWMSVueWhen true, turns on the MonitorEdtQueue class.  Identifies what calls are causing the UI to become unresponsive due to threadingvmparam -DMonitorEDT=false
LogEDTboolean

CWMSVue

When true, turns on the LogViolationRepaintManager class.  This class logs UI calls that are improperly accessed by background threads. 

vmparam -DLogEDT=false
http.agentStringMapSets the http agent to a recognizable browser for the internet map sitesvmparam -Dhttp.agent="Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
statePlane.directoryStringMapFile location of the state plane directory for mappingvmparam -DstatePlane.directory=..\config
MapPanel.NoVolatileImageBooleanMapDisables VolitileImages in the MapPanel solving bad graphical glitches as well as Direct3D for 1.6 Update 10 compatibility.    vmparam -DMapPanel.NoVolatileImage=true
ShowAllElementsInMenuBooleanMapWhen selecting an element in the Modeling Tab's map window, show all elements associated with the map location if set to true

Not in cavi.config

vmparam -DShowAllElementsInMenu=true

HasShapeMapToolBooleanMapAdds the Shape Map Tool to the Wat Map Schematicvmparam -DHasShapeMapTool=true

AlternateFrameLayout

BooleanUIIf set true, the Watershed panel will appear on the right and the tabs along the left instead of the bottomvmparam -DAlternateFrameLayout=true
UseWindowsLnFBooleanUIWhen set to true, enables the Windows look and feel on Windows. When set to false, or unset, uses the default system look-and-feel (usually Metal)vmparam -DUseWindowsLnF=true
DEBUG_RASSERVERSBooleanRAS Plugin When set true, when debugging RAS, RAS will not be started by CAVI, it will start by an external processvmparam -DDEBUG_RASSERVERS=true
Launcher.quietModeBooleanRAS Plugin When set true, passes -q to the javaStarter that disables any message boxesvmparam -DLauncher.quietMode=true
RasPlugin.NoRasCallbacksBooleanRAS Plugin If set true, disables RAS callbacks used for progress barsvmparam -DRasPlugin.NoRasCallbacks=true
RasPlugin.DebugOutputBooleanRAS Plugin When set true, output is passed through the RAS Plugin to the main (CAVI) application's logvmparam -DRasPlugin.DebugOutput=true
RasPlugin.ServerLookupTriesNumericRAS Plugin Controls how many times the RAS plugin will try to connect to RAS before giving upvmparam -DRasPlugin.ServerLookupTries=10
RasPlugin.ServerWaitMsNumericRAS Plugin How long to wait between each attempt to connect to RAS in millisecondsvmparam -DRasPlugin.ServerWaitMs=100
ClientCheckInURLStringRAS Plugin Overrides the client check-in URL passed to the other process for the plugin used for shutting down if CWMS diesvmparam -DClientCheckInURL=//127.0.0.1:8686/CAVI
RasPlugin.exe.dirStringRAS Plugin Location of the javastarter.exe to start the RAS Plugin. Defaults to user.dirvmparam -DRasPlugin.exe.dir=..\
python.pathStringPythonDirectory path to jython jarsvmparam -Dpython.path=..\jar\sys\jython-standalone-2.7.0.jar\Lib;..\jar\jythonDbApi-v4.1-dev.jar
python.homeStringPythonDirectory location for Python homevmparam  -Dpython.home=..\
python.cachedir.skipBooleanPythonIf set true, Reduces the NameErrors from occurring  
in Jython scripts that use wildcard imports
vmparam -Dpython.cachedir.skip=true
javax.net.ssl.cwms.keyStoreTypeStringJava/CWMSEnable SSL for CWMS Java KeyStorevmparam -Djavax.net.ssl.cwms.keyStoreType=JKS
java.security.policyStringJavaFile path to java security policyvmparam -Djava.security.policy=jar:file:jar/rmadev.jar!/com/.java.policy
java.rmi.server.hostnameNumericJavaIP of the rmi server vmparam -Djava.rmi.server.hostname=127.0.0.1
com.sun.media.jai.disableMediaLibBooleanJava

If true, will disable mediaLib searching that produces unwanted errors

vmparam -Dcom.sun.media.jai.disableMediaLib=true
javax.net.debugBooleanJavaSet to true to turn on to debug SSL connections

commented out in cavi.config

vmparam Djavax.net.debug=true

java.util.logging.config.fileStringJavaLogging settings to CWMS\config\propertiesvmparam -Djava.util.logging.config.file=./config/properties/logging.properties
jna.tmpdirStringJavaDirectory location for JNA to extract its files tovmparam -Djna.tmpdir=C:/Temp/cwms/temp
sun.rmi.server.exceptionTraceBooleanJavaThis property controls the output of server-side stack traces from exceptions and errors that are thrown by dispatched, incoming remote calls. If this value is true, exception stack traces will be printed. vmparam -Dsun.rmi.server.exceptionTrace=true
java.rmi.server.hostnameNumericJavaThe RMI server hostname/IPvmparam -Djava.rmi.server.hostname=127.0.0.1
oracle.caching.openallconnections (Can be removed in 3.3.x.  No longer used)BooleanOracleIf set to true, use loopback so that the Corps PC firewall doesn't
keep the CAVI from communicating to the plugins
vmparam -Doracle.caching.openallconnections=true
sun.java2d.nodrawBooleanJavaWhen true, sets Java to not use hardware acceleration. Some multiple monitor configurations display CAVI windows as black screens when dragging between monitors, because the monitors are using different video cards. Java SE 6 Update 10, which contains a new implementation of D3D support. (Setting sun.java2d.noddraw=true is now interpreted exactly the same as disabling that via sun.java2d.d3d=false.)vmparam -Dsun.java2d.nodraw=true
com.sun.media.jai.disableMediaLib BooleanJavaIf true, turns off the MediaLib functionality.  Used for 32-bit libraries to help load the internet maps faster vmparam -Dcom.sun.media.jai.disableMediaLib=true
java.library.pathString JavaFile path to java libraryvmparam -Djava.library.path=../shared/lib64
prism.orderStringJavaTurn on software rendering for JavaFXvmparam -Dprism.order=sw

DLogPluginCalls

BooleanJava

turn on logging of API calls to the plugins. Configuring the config/properties/logging.properties lets you define what you want to log. Add -D to CAVI.config file and have the logging.properties file line in the cavi.config uncommented (also replace the relative path with the full path to the logging.properties file on the line)

hec2.util.InterfaceLogProxy.All.level = FINE -logs the entry and exit. hec2.util.InterfaceLogProxy.All.level = FINER -logs the entry and exit, parameters passed in and return value hec2.util.InterfaceLogProxy.All.setDataLocations.level = FINER -would log just the calls to setDataLocations hec2.util.InterfaceLogProxy.RasPluginClient.setDataLocations.level = FINER -would log just the calls to the RAS plugin's setDataLocations

vmparam -DLogPluginCalls=true