Start Up Options¶
Server Program Options¶
By default the servers is started on the localhost and only processes running on that system could access the server.
The server provides the following startup arguments (Server Program Options
).
Note: The package you received may not contain server. Please contact Aware if you are interested in server.
Argument | Description |
---|---|
h [ –help ] | Produce help message. |
-c [ –config ] | Load configuration from specified file. |
-l [ –log-config ] | Load log4cplus configuration from specified file. |
–host | Set host name (default localhost). |
-p [ –port ] | Set port number (default 8080). |
-u [ –url-path ] | URL base path |
–certificate | Path to PEM certificate keystore file, enabling TLS. |
–password | TLS certificate private key password (use if private key is encrypted). |
-w [ –workers ] | Set number of workers. Defaults to one worker per CPU core. |
-o [ –optimization-model ] | Set the path to the optimization model. Defaults to GeneralModel.bin |
–v600 | Whether the V600 algorithm is enabled or disabled. Defaults to disabled. |
–v900 | Whether the V900 algorithm is enabled or disabled. Defaults to disabled. |
–cache.name | Name of the cache. |
–cache.dir | Directory where the cache will be stored. |
–cache.max-encounters | Maximum number of encounters allowed in the cache. |
–cache.v600 | Configuration for the V600 algorithm. Acceptable values: disabled - V600 data not stored in cache. cache_ram - V600 stored in the RAM cache. cache_disk - V600 stored in the disk cache. |
–cache.v900 | Configuration for the V900 algorithm. Acceptable values: disabled - V900 data not stored in cache. cache_ram - V900 stored in the RAM cache. cache_disk - V900 stored in the disk cache. |
–logged-audio-path | Set path to store logged audio. |
–db-host | Transaction counting database host server. |
–db-user | Transaction counting database login user name. |
–db-pw | Transaction counting database login password. |
–db-name | Transaction counting database name. |
–db-poll-interval | OPTIONAL: Transaction counting database polling interval for reconnecting. Time in minutes. Default 5 minutes. |
Server Log Configuration¶
We use log4cplus API as our logging framework. log4cplus uses a config file where various appenders can be initialized and then later assigned to nexa voice rest server. Appender is that defines what will be logged and where it output its logs.
The logging can be controlled by the parameters specified in the nexa_voice_log_config.ini file. This file defines what will be logged to the console and what will be logged to the log file. The default log configuration is set to roll over monthly. The formatting options (i.e. [%-5p][%d] %m%n) in the Knomi logging configuration file are defined by the log4cplus library.
# MyConsoleAppender
log4cplus.appender.MyConsoleAppender=log4cplus::ConsoleAppender
log4cplus.appender.MyConsoleAppender.layout=log4cplus::PatternLayout
log4cplus.appender.MyConsoleAppender.layout.ConversionPattern=[%-5p][%d] %m%n
# InfoLogAppender
log4cplus.appender.InfoLogAppender=log4cplus::DailyRollingFileAppender
log4cplus.appender.InfoLogAppender.File=./nexa_voice_info.txt
log4cplus.appender.InfoLogAppender.layout=log4cplus::PatternLayout
log4cplus.appender.InfoLogAppender.layout.ConversionPattern=[%-5p][%d] %m%n
log4cplus.appender.InfoLogAppender.Schedule=MONTHLY
log4cplus.appender.InfoLogAppender.RollOnClose=false
# JsonAppender
log4cplus.appender.JsonAppender=log4cplus::DailyRollingFileAppender
log4cplus.appender.JsonAppender.File=./nexa_voice_stats.js
log4cplus.appender.JsonAppender.layout=log4cplus::PatternLayout
log4cplus.appender.JsonAppender.layout.ConversionPattern=%m%n
log4cplus.appender.JsonAppender.Schedule=MONTHLY
log4cplus.appender.JsonAppender.RollOnClose=false
log4cplus.logger.aw_nexa_voice_rest_server_info=INFO, MyConsoleAppender, InfoLogAppender
log4cplus.logger.aw_nexa_voice_rest_server_stats =INFO, MyConsoleAppender, JsonAppender
Stats log contents and purpose¶
In the above config file example, JsonAppender is configured to log output into the file nexa_voice_stats.js. This log file will contain detail information of the transaction e.g. like username, timestamp, audio clip of the transaction and liveness score.
Info log contents and purpose¶
InfoLogAppender, the other appender in the above example which is configured to log output into the file nexa_voice_info.txt, have access log such as which endpoint is being hit.