Troubleshooting
Logs
Log Files
The log files on the client and server are located in the following locations respectively.
- Client
C:\ProgramData\GHealth\Client\Log
- Server
- Proxy -
C:\ProgramData\GHealth\Proxy\Log - Web -
C:\ProgramData\GHealth\Web\Log
- Proxy -
Seq
The G-Health services (GHealth.ProxyService, GHealth.WebService and GHealth.ClientService) support logging to the centralised structured logging service Seq
G-Health v4.2+
In version 4.2 the logging in G-Health was switched to use the Serilog logging library. To configure this you need to edit the appsettings.json file for each service, located in the install folder for each.
"Serilog": {
"MinimumLevel": {
"Default": "Information",
"Override": {
"Microsoft": "Warning",
"Microsoft.AspNetCore.Hosting.Diagnostics": "Error",
"Microsoft.Hosting.Lifetime": "Information",
"Microsoft.AspNetCore": "Warning",
"Microsoft.EntityFrameworkCore": "Warning",
"GHealth": "Debug"
}
},
}
```
By default the logging configuration in the ```appsettings.json``` looks something like the above.
The below configuration needs to be added to it within the ```Serilog``` section. Configuring your Seq server URL and API Key.
```json
"Using": [ "Serilog.Sinks.Seq" ],
"WriteTo": [
{
"Name": "Seq",
"Args": {
"serverUrl": "http://127.0.0.1:5341",
"apiKey": ""
}
}
]
```
In the end it should look something like this:
```json
"Serilog": {
"Using": [ "Serilog.Sinks.Seq" ],
"MinimumLevel": {
"Default": "Information",
"Override": {
"Microsoft": "Warning",
"Microsoft.AspNetCore.Hosting.Diagnostics": "Error",
"Microsoft.Hosting.Lifetime": "Information",
"Microsoft.AspNetCore": "Warning",
"Microsoft.EntityFrameworkCore": "Warning",
"GHealth": "Debug"
}
},
"WriteTo": [
{
"Name": "Seq",
"Args": {
"serverUrl": "http://192.168.87.10:5341",
"apiKey": ""
}
}
]
},
Earlier versions
Earlier versions of G-Health configured the logging differently. The configuration was done by editing the nlog.config file foreach service located alongside each service executable in the installation folders.
In the nlog.config XML configuration file locate the section for the seq target. Edit the serverURL value to that of your Seq server and if required your API key.
<target name="seq" xsi:type="BufferingWrapper" bufferSize="1000"
flushTimeout="2000" slidingTimeout="false">
<target xsi:type="Seq" serverUrl="http://127.0.0.1:5341" apiKey="">
<property name ="ProcessName" value="${processname}" />
<property name="ThreadId" value="${threadid}" as="number" />
<property name="MachineName" value="${machinename}" />
<property name="Source" value="${logger}" />
</target>
</target>