Errors and Troubleshooting
The following information can help diagnose problems with the gSharp server and its module calculations.
Server Log
The gSharp server logs information, errors, and debugging messages to a database. These can be read from the Server Log tab of the gSharp Administration app.

If the list is scrolled to the bottom (the default behavior), it will automatically update every 5 seconds, showing any new log entries. Scrolling up will stop automatic updates until the list is scrolled back to the bottom. The list initially retrieves about 1,000 log entries, but scrolling toward the top will load more.
Log View Settings
The log view settings panel can be opened by clicking the toggle button in the top-right corner of the window. This will reveal the settings panel.

Column Width and Visibility
The width of the columns can be changed by dragging the right-hand edge of the column header:
By default, only a selection of columns is displayed. Using the Column Visibility list, any column can be shown or hidden by checking or unchecking a column.
These settings are saved in the Administration app's user settings (rather than by the gSharp server itself), so they persist even after the app is closed and restarted.
Column Descriptions
The available columns are listed in the table below. Note that the Calc Xxxxx columns only contain values for log entries related to calculation execution, helping differentiate similar calculation messages.
| Column Name | Description |
|---|---|
| ID | The log entry's ID in the database. |
| Timestamp | The date and time when the entry was logged. |
| Level | The log entry's severity level. |
| Source | The source of the log entry. Entries may originate from the gSharp server engine (indicated by $Server) or from an assembly host (indicated by the assembly name). |
| Logger | The name of the logger that generated the entry. The gSharp server has about 25 loggers, each representing a logging category. This is primarily used for advanced debugging. |
| Code | A unique log code that identifies where the entry was generated in the server. Used for advanced debugging. |
| Log Context | Some log entries are logged multiple times and provide context to distinguish between them (e.g., loop iterations). |
| Message | The log entry's message, containing error, informational, or debugging details. |
| Calc Assembly | The name of the assembly where the calculation was executed. Typically, this matches the registered assembly file name. |
| Calc Module | The name of the calculation module that was executed (excluding its namespace). |
| Calc Context | The context name of the executed calculation. |
| Calc Timestamp | The execution timestamp of the calculation. This may differ from when the log entry was created due to queuing delays. |
| Exception | If an error occurs, it is usually reported as an exception. The exception message is displayed here. More details can be seen in the Log Entry Detail dialog, described below. |
Log Entry Detail Dialog
Double-clicking a log entry opens the Log Entry Detail dialog, which displays the full details of the entry without needing to adjust column widths.

This dialog does not block the Administration app’s main window and updates as you select different log entries. Navigation arrows at the top-right allow switching between entries.

Error and Fatal log entries (see Log Levels below) often contain exception details, which appear in the Exceptions section.

Exceptions can have nested structures, such as System.Exception containing an inner exception or System.AggregateException containing multiple inner exceptions. The example above illustrates a complex exception hierarchy.
Log Filtering
Log entries can be filtered to display only relevant records. Filters must be applied by clicking Apply, which updates the list. Clicking Reset clears all filters.
The filtering function operates as a search with parameters rather than filtering retrieved entries. Filters are applied on the server side before data retrieval.
| Filter Name | Description |
|---|---|
| Start Time | The earliest log entry to display. Accepts absolute or relative time expressions (e.g., *-1d for one day ago). |
| End Time | The latest log entry to display. Accepts absolute or relative time expressions. |
| Minimum Level | The minimum log level to display (see Log Levels). |
| Source | Filters by the Source column (e.g., $Server or an assembly name). |
| Module | Filters by the Module column. Case-insensitive and matches partial names (e.g., "conc" matches "Concentration" and "Reconciliation"). |
| Context | Filters by the Context column. Case-insensitive and matches partial names. |
| Message | Filters by messages containing specific text. Case-insensitive. |
Filters are combined using AND logic. For example:

This example displays log entries from the last two hours, originating from the GSharpTankDemo assembly, with a level of Warn or higher and messages containing "over".
Column visibility and widths are saved between sessions, but filter settings are not.
Log Export
Logs can be exported using the button, which opens the Export Logs dialog.

Export Details
The Export Details section allows specifying the file format and name. If a relative path is provided, the file is saved in the user’s Documents folder.
The file extension should match the selected format. If the extension does not match, the file will be saved with the specified extension, but its contents will use the selected format.
Exporting
Click Start to begin exporting. A progress bar displays the status.

Exporting can be canceled at any time, retaining logs exported up to that point.
Logging Settings
Log Levels
The gSharp server uses the following log levels:
| Level | Name | Description |
|---|---|---|
| Very detailed logging, often repetitive. | ||
| Low-level messages useful for debugging. | ||
| Essential messages without excessive detail. | ||
| Warnings that may indicate potential issues. | ||
| Errors that do not stop the server but require attention. | ||
| Severe errors that must be addressed immediately. |
Log Level Settings
The Module Logging Levels and Server Logging Levels sections in the Settings tab allow setting minimum log levels.

Setting a module to Trace enables detailed debugging for that module while keeping logs for others minimal.
By default, all log levels are set to Info, which logs Warn, Error, and Fatal messages as well. Using Debug or Trace should be temporary, as they generate large logs quickly.