FBTMLoggerSvc - Getting Started
While you can administrate (install, uninstall, start, pause, resume, stop, restart) FBTMLoggerSvc3 based services with the various command-line switches of FBTMLoggerSvc3.exe, the most easiest and recommended way is to use the project wizard in FB TraceManager 3. It will use the FBTMLoggerSvc3.exe executable with the proper command-line switches behind the scene. This section gets you started administrating FBTMLoggerSvc3 based Windows services in FB TraceManager 3.
Windows Vista/7 UAC notice: You don't necessarily have to start FB TraceManager 3 with the "Run as administrator" option on Windows Vista/7 to work with the Logger Service feature. For all Windows Services related tasks, FB TraceManager 3 launches FBTMLoggerSvc3.exe with an "Runas" option, which results in the usual UAC confirmation dialog. You won't see this dialog, if FB TraceManager 3 has been started with "Run as administrator" though.
Hint: The logger service operates always with Log to database = True, independent of the session option. The commit interval setting is used from the session options though.
The Register Project wizard got a new tab called Logger Service, as shown in the following screen. Here you can administrate project-based logger services very easily.
The toolbar allows you to:
1. | Refresh the service state |
2. | Auto-assign logger service settings (session name, service name, ...) based on the project name |
3. | Save and reload the project data, which is useful to make a newly created project logger service ready. Basically, this saves the project information and fetches a newly created project id from the database. A project id > 0 is mandatory to enable the Install Service button. When creating a new project or duplicating an existing project, you MUST save and reload the project data before installing the service. This doesn't apply when working on an already persisted project. |
4. | Install service |
5. | Uninstall service |
6. | Start/Resume service |
7. | Stop service |
8. | Pause service |
9. | Restart service |
Logger Service Settings
A logger service is based on various settings. This includes:
• | Session name: Trace session name, which is shown in the list of trace sessions. Can be (or even recommended) different to the project session name |
• | Service name: Name of the Windows Service. No spaces, special characters ... permitted |
• | Display name: Display of the Windows Service as shown in the list of Windows services |
• | Configuration file: Path to a FB TraceManager 3 configuration file fbtm_program.ini |
• | Project ID: Project id for the selected project in the FBTM3.fdb database. If the value is < 0 or if you are duplicating an existing project, then make sure to use the Save Project and Reload button before installing the service! For an already persisted project, you don't have to reload project data before service installation. |
Install Service
The Install Service button gets enabled, if the logger service settings are provided. This can be easily done by clicking the Auto-Assign Settings button. Settings are generated based on the project name. The result is shown in the following screen.
Then click the Save Project and Reload button to get a valid Project ID. For example:
The Install Service button is enabled and you are ready to install the service. Click the Install Service button. A Windows service with Startup Type = Manual is installed. The installed service is listed in the Windows services list.
The various other buttons (Uninstall Service, Start Service ...) of the toolbar in the Logger Service tab get enabled/disabled according to the service state.
Once a service is installed, you aren't able to change the service settings, except the logger service session name. You have to uninstall the service by clicking the Uninstall Service button first.
Click the Refresh button to re-read the service state, which refreshes the control state of the buttons accordingly. This is especially useful, if you administrate (start, stop ...) the service via the native Windows services panel.
Start / Control Services
A newly installed service isn't started yet. Click the Start Service button to start the service. According to the service state, the Resume/Stop/Pause/Restart Service buttons are enabled/disabled. Controlling the services directly affects the trace session. For example, if you stop the logger service, the trace session gets terminated and you won't see it in the list of trace sessions anymore. Also, if you pause the logger service, the trace session is suspended.
Uninstall Service
To uninstall the logger service, click the Uninstall Service button. You are now able to redefine the logger service settings and install again.