Skip to main content

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.

The gSharp Administration app showing the gSharp server log

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 Log view settings toggle button toggle button in the top-right corner of the window. This will reveal the settings panel.

The settings panel of the Administration app's Server Log tab

Column Width and Visibility​

The width of the columns can be changed by dragging the right-hand edge of the column header:

Resizing the Level column of the Administration app's server log view

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.

The Column Visibility list of the Administration app

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 NameDescription
IDThe log entry's ID in the database.
TimestampThe date and time when the entry was logged.
LevelThe log entry's severity level.
SourceThe 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).
LoggerThe 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.
CodeA unique log code that identifies where the entry was generated in the server. Used for advanced debugging.
Log ContextSome log entries are logged multiple times and provide context to distinguish between them (e.g., loop iterations).
MessageThe log entry's message, containing error, informational, or debugging details.
Calc AssemblyThe name of the assembly where the calculation was executed. Typically, this matches the registered assembly file name.
Calc ModuleThe name of the calculation module that was executed (excluding its namespace).
Calc ContextThe context name of the executed calculation.
Calc TimestampThe execution timestamp of the calculation. This may differ from when the log entry was created due to queuing delays.
ExceptionIf 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.

The Administration app's Log Entry Detail dialog showing an Info log from a calculation

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.

The Administration app's Log Entry Detail dialog showing the selected entry arrow buttons

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

The Administration app's Log Entry Detail dialog showing an exception

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.

note

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 NameDescription
Start TimeThe earliest log entry to display. Accepts absolute or relative time expressions (e.g., *-1d for one day ago).
End TimeThe latest log entry to display. Accepts absolute or relative time expressions.
Minimum LevelThe minimum log level to display (see Log Levels).
SourceFilters by the Source column (e.g., $Server or an assembly name).
ModuleFilters by the Module column. Case-insensitive and matches partial names (e.g., "conc" matches "Concentration" and "Reconciliation").
ContextFilters by the Context column. Case-insensitive and matches partial names.
MessageFilters by messages containing specific text. Case-insensitive.

Filters are combined using AND logic. For example:

The filters of the Administration app's Server Log tab with an example filter

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".

note

Column visibility and widths are saved between sessions, but filter settings are not.

Log Export​

Logs can be exported using the Log export button button, which opens the Export Logs dialog.

The default Export Logs dialog of the gSharp Administration app

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.

The Export Logs dialog of the gSharp Administration app showing logs being exported

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:

LevelNameDescription
TraceVery detailed logging, often repetitive.
DebugLow-level messages useful for debugging.
InfoEssential messages without excessive detail.
WarnWarnings that may indicate potential issues.
ErrorErrors that do not stop the server but require attention.
FatalSevere 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.

The gSharp Administration app showing the gSharp server settings tab

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.