Skip to content
Architecture > Configuration Guide

Common Properties

AMI Properties

(Applies to Components: Center, Relay, Web, WebBalancer)

  • f1.terminate.file: A small file will be created and monitored by AMI. If an external process moves / copies to a file of the same name, but with a ".kill" suffix the process will exit (this provides any easy way for an external script or job control process to cleanly shutdown AMI).
  • f1.threadpool.default.size: The number of threads in the core thread pool (this does not include threads for http servicing or image processing).
  • f1.threadpool.aggressive: if true will use an "aggressive" thread pool. This pool will wake up faster, but uses more CPU while idle.
  • f1.conf.dir: directory to where the configuration files are located, default is config.
  • f1.conf.filename: name of the configuration file loaded at start up, default is root.properties.
  • f1.timezone: set timezone for Java (note, this does not control default user or logger timezones)
  • f1.locale: default locale.
  • f1.logs.dir: the root directory for where log files will be deposited.
  • f1.plugins.dir: directory of where plugins will be loaded from.
  • f1.resources.dir: directory of where additional resources will be placed.
  • ami.components: a comma delimited list of which components to load, which can include an of: relay,center,web,webbalancer,webmanager. The default is the three components: relay,center,web.
  • ami.amilog.stats.period: How often AMI should log general health statistics such as memory, user load, etc. which can be used for real-time/historical monitoring via the performance dashboard. Default: 15 SECONDS.
  • ami.naming.service.resolvers: Specify a comma delimited list of naming service plugin classes (implements com.f1.ami.amicommon.AmiNamingServiceResolver). These can be used to map logic service names to physical host/ports.
  • ami.content.security.policy: The default content security policy is:img-src 'self' https://*.mapbox.com data: w3.org/svg/2000; default-src https://*.mapbox.com 'self' 'unsafe-inline' 'unsafe-eval' blob:.For more information regarding Content Security Policy, please refer to the following link: Content Security Policy (CSP)
  • ami.aes.key.file: The aes key file used for encrypting / decrypting secure data (see strEncrypt/strDecrypt in the Center methods for examples)
  • ami.aes.key.text: The aes key used for encrypting / decrypting secure columns (instead of using ami.aes.key.file)
  • ami.aes.key.strength: Key strength, ex: 128

Logging

Log Levels

Code Full label
ALL All
FNE Fine
INF Info
WRN Warning
SVR Severe
OFF OFF

You may adjust the log level for a certain class of logs by replacing the part after the last semicolon with the code in the above table:

speedlogger.stream.CLASSNAME=BASIC_APPENDER;FILE_SINK;WRN

Logging Configuration

The following set of configuration allows you to redirect logging to Stdout:

Basic

1
2
3
4
5
6
7
8
9
speedlogger.appender.BASIC_APPENDER.pattern=%P %d{YMD-h:m:s.S z} \[%t\] %c::%M: %m %D%n
speedlogger.appender.BASIC_APPENDER.timezone=EST5EDT
speedlogger.appender.BASIC_APPENDER.type=BasicAppender
speedlogger.sink.FILE_SINK.type=file
speedlogger.sink.FILE_SINK.fileName=\${f1.logs.dir}/\${f1.logfilename}.log
speedlogger.sink.FILE_SINK.maxFiles=10
speedlogger.sink.FILE_SINK.maxFileSizeMb=1000
speedlogger.stream.=BASIC_APPENDER;FILE_SINK;INFO
speedlogger.stream.AMI=BASIC_APPENDER;FILE_SINK;OFF

AmiScript

1
2
3
4
5
speedlogger.appender.SIMPLE_APPENDER.pattern=%P %d{YMD-h:m:s.S z} \[%t\] %c: %m %D%n
speedlogger.appender.SIMPLE_APPENDER.timezone=EST5EDT
speedlogger.appender.SIMPLE_APPENDER.type=BasicAppender
speedlogger.stream.AMISCRIPT.LOGINFO=SIMPLE_APPENDER;FILE_SINK;INF
speedlogger.stream.AMISCRIPT.LOGWARN=SIMPLE_APPENDER;FILE_SINK;WRN

Backend Messages

1
2
3
4
5
6
7
8
speedlogger.appender.AMIMESSAGES_APPENDER.pattern=%d{YMD-h:m:s.S z} %m%n
speedlogger.appender.AMIMESSAGES_APPENDER.timezone=EST5EDT
speedlogger.appender.AMIMESSAGES_APPENDER.type=BasicAppender
speedlogger.sink.AMIMESSAGES_SINK.type=file
speedlogger.sink.AMIMESSAGES_SINK.fileName=\${f1.logs.dir}/AmiMessages.log
speedlogger.sink.AMIMESSAGES_SINK.maxFiles=10
speedlogger.sink.AMIMESSAGES_SINK.maxFileSizeMb=1000
speedlogger.stream.AMI_MESSAGES=AMIMESSAGES_APPENDER;AMIMESSAGES_SINK;INFO

AMI Statistics

1
2
3
4
5
6
7
speedlogger.appender.AMISTATS_APPENDER.pattern=%m%n
speedlogger.appender.AMISTATS_APPENDER.type=BasicAppender
speedlogger.sink.AMISTATS_SINK.type=file
speedlogger.sink.AMISTATS_SINK.fileName=\${f1.logs.dir}/\${f1.logfilename}.amilog
speedlogger.sink.AMISTATS_SINK.maxFiles=10
speedlogger.sink.AMISTATS_SINK.maxFileSizeMb=1000
speedlogger.stream.AMI_STATS=AMISTATS_APPENDER;AMISTATS_SINK;ALL

Log Directory

To redirect all logging (AmiOne.log/AmiMessages.log/AmiOne.amilog) to another location, you will need to override the below property in local.properties to point to the new folder:

f1.logs.dir=absolute/or/relative/path/to/new/folder

Disable per-class

Any time you wish to mute certain messages from showing up in your AmiOne.log, you can use the following template, replace CLASSNAME with the full class name, and put that inside your local.properties file:

speedlogger.stream.CLASSNAME=BASIC_APPENDER;FILE_SINK;OFF

Note that each line turns off logging for a single class only.

Here is an example of extracting the class name from AmiOne.log:

INF 20231108-13:32:25.009 EST5EDT [F1POOL-04] com.f1.ami.amicommon.centerclient.AmiCenterClientState::onUserSnapshotRequest: localhost:3341 (seqnum=721) User demo requested: [team] of which [team] will be requested from the Ami Center

Java VM Properties

The Java VM Properties can be configured in AMI_One.vmoptions (for windows) or AMI_One_linux.vmoptions (for linux), which are parsed in start.sh. Some of these properties control how messages are logged and how garbage collection is handled. Here are some concrete examples of Java VM Properties

  • -Df1.global.procinfosink.file=./.f1proc.txt: controls where AMI will write proc information. Note, this proc information includes uptime/downtime/process id/and processuid
  • -Df1.license.file=${HOME}/f1license.txt,f1license.txt,config/f1license.txt: comma delimited list of where the f1license.txt file(s) should be looked for
  • -Df1.license.property.file=config/local.properties: The file that contains a line in the format f1.license.file=xxxxx which points to the license file
  • -Dproperty.f1.conf.dir=config/: Directory where the root.properties is located.
  • -Djava.util.logging.manager=com.f1.speedlogger.sun.SunSpeedLoggerLogManager: Forces java to use the 3Forge logger
  • -Dlog4j.configuratorClass=com.f1.speedloggerLog4j.Log4jSpeedLoggerManager: Forces other 3rd party plugins that were written for log4j to use 3Forge logger instead
  • -Dlog4j.configuration=com/f1/speedloggerLog4j/Log4jSpeedLoggerManager.class: Forces other 3rd party plugins that were written for log4j to use 3Forge logger instead
  • -Dproperty.f1.properties.secret.key.files=/path/to/keyfile: If specified, the ${CIPHER:xxxxxx} syntax within .properties files will be decoded using the file's key. (See tools.sh for creating a key). comma delimit for multiple files
  • -Dproperty.f1.properties.decrypters=[DECRYPTERID]=com.package.DecrypterClass: If specified, the ${CIPHER:[DECRYPTERID]:xxxxxx} syntax within .properties files will be decoded using class. (See com.f1.utils.encrypt.Decrypter Interface) Comma delimit for multiple classes