Arcentry Enterprise - Running as a Service & Logging
Arcentry Enterprise can run as a background service on Windows. To do so, it spawns a daemon process that controls and manages the Arcentry Enterprise process itself. Here's how it works:
To install the service, open a cmd prompt with administrator privileges
arcentry-enterprise-win.exe --service install
You should see
Once installed, you should see the service in the task manager's service tab:
as well as in Window's service panel
From here, you can start and stop the service as well as check on its status.
The Arcentry Service can be controlled from Window's task manager or service panel (see above) or from the command line. Here you can run any of the following commands:
arcentry-enterprise-win.exe --service start arcentry-enterprise-win.exe --service stop arcentry-enterprise-win.exe --service restart
The service can be uninstalled by running the following command:
arcentry-enterprise-win.exe --service uninstall
You can install and run as many instances of Arcentry Enterprise as a service as you like. To do so, simply add a --servicename somename parameter to any service command, e.g.
arcentry-enterprise-win.exe --service install --servicename devServer arcentry-enterprise-win.exe --service start --servicename devServer arcentry-enterprise-win.exe --service install --servicename prodServer arcentry-enterprise-win.exe --service start --servicename prodServer
A Service is a background process that does not have associated console output. To allow for logging, Arcentry 1.10.0 introduces two new logging options: File and Event Viewer.
You can configure these in the Logging section of arcentry-conf.yml
# Logging logLevel: info # can be debug, info, warn or error logType: console # Can be console, file or event-viewer logDir: logs/ # Base path for logs, relative to the working directory. Only applied if logType = file
Arcentry's file logging not only redirects the output of the log stream to a file, but also manages this file, creates new files if the current one gets too big and rotates the files so ensure seamless logging throughout. To use file logging, set the logType in arcentry-conf.yml to file.
You can see realtime logs by "tailing" this file. This can be done via PowerShell by running:
Get-Content arc-std-log.txt -Wait
or by using one of the techniques outlined here.
Windows comes with an internal event-viewer that services are expected to log to. You can access it from the start-menu by searching for "Event Viewer":
Arcentry supports this option by setting the logType in arcentry-conf.yml to event-viewer.
To see Arcentry's logs, select "Windows Logs -> Application" on the left and search/filter for "Arcentry Enterprise" in the source column.