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.
-h [–help] | Produce a help message. |
-c [ –config ] | Load configuration from the specified file. |
-l [ –log-config ] | Load log4cplus configuration from the specified file. |
–host | Set the host name. Default localhost. |
-p [ –port ] | Set the port number. Default 8088. |
-u [ –url-path ] | URL base path. Default documentAnalyzer. |
–save-autocapture-requests | Saves autocapture requests to the specified directory. |
-t [ –concurrent-tasks ] | Set the maximum number of concurrent documentAnalyzer tasks. Defaults to the number of cores available. |
-q [ –queue-size ] | Set the maximum number of documentAnalyzer tasks that can be queued up. Defaults to unlimited. |
–certificate | Path to PEM certificate keystore file, enabling TLS. |
–password | TLS certificate private key password. Use if the private key is encrypted. |
–encable-cors | Enable Cross-Origin Resource Sharing. |
–cors-acao-policy | Access-Control-Allow-Origin policy. Default *. |
–cors-acac-policy | Access-Control-Allow-Credentials policy. Default “”. |
–cors-aceh-policy | Access-Control-Expose-Headers policy. Default “”. |
–cors-acma-policy | Access-Control-Max-Age policy. Default “”. |
–cors-acam-policy | Access-Control-Allow-Methods policy. Default “GET”, “POST”, and “OPTIONS”. |
–cors-acah-policy | Access-Control-Allow-Headers policy. Default “Content-Type”. |
–endpoint-decryption-key | Path to endpoint decryuption key. Enables encrypted requests. |
–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 is 5 minutes. |
Server Log Configuration¶
The logging can be controlled by the parameters specified in the knomi_document_analyzer_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. See (Logging configuration example
).
# 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=./knomi_document_analyzer_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=./knomi_document_analyzer_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_knomi_document_analyzer_rest_server_info=INFO, MyConsoleAppender, InfoLogAppender
log4cplus.logger.aw_knomi_document_analyzer_rest_server_stats=INFO, MyConsoleAppender, JsonAppender