Skip to main content

Core Properties

When you write log entries in a gSharp module, there are several core properties that gSharp will automatically attach to your log entries (see the Structured Logging section). These properties provide important context about the log entry and can be used to filter and analyze logs.

The gSharp administration app displays these core properties:

Log Code Filter Result

The display and filtering of these properties in the app is managed in the Server Log tab by opening the settings panel using the Server log settings button button in the top-right corner of the page.

Server log settings

Code Property​

Property Name: Code

This is the code specified by the first argument of many of the log methods of the module's Log property, which is intended to be a short string that categorizes the log entry. For example, the "ModInit" code is used in the following log entry:

Log.Info("ModInit", "The TankVolume module has been initialized.");

The code can be seen in the gSharp administration app's log viewer and can be used to filter log entries.

Log Code Filter Result

Calculation Assembly Property​

Property Name: CalcAssembly

This is the name of the calculation assembly that contains the module that generated the log entry. The administration app can display this property (hidden by default) but there is no direct filter for it. However, for the purposes of a calculation assembly, the Source column is identical to this CalcAssembly property and can be filtered using the Source filter field.

Calculation Module Property​

Property Name: CalcModule

This is the name of the module that generated the log entry. The administration app displays this property in the Calc Module column and it can be filtered using the Module filter field.

Calculation Context Property​

Property Name: CalcContext

This is the name of the calculation context that was active when the log entry was generated. The administration app displays this property in the Calc Context column and it can be filtered using the Context filter field.

Calculation Timestamp Property​

Property Name: CalcTimestamp

This is the UTC timestamp of when the log entry was generated. The administration app displays this property in the Calc Timestamp column as a local time of the app's timezone.

Schedule Property​

Property Name: Schedule

This is the name of the schedule that activated the calculation which generated the log entry. The administration app does not display this property; it is only present in the log entry's property structure.

Source Pseudo Property​

Property Name: Source

The Source property is not actually attached to log entries. It exists to separate calculation assembly log entries from each other and from the gSharp server and administration app's logs. Log files are organized into folders named after the Source property and database log entries write the source to a dedicated Source column.

For the purposes of calculation assembly logs it is the same as the CalcAssembly property. The administration app displays it in the Source column of the log viewer and it can be filtered using the Source filter field.