XAP.NET components use the tracing mechanism for logging/tracing, built-in with the .NET framework. This gives the user, control over tracing behavior using the standard .NET configuration schema. Users can:
- configure the level of events which are traced
- assign one or more trace listeners which route the events to a logging facility
- implement custom trace listeners to integrate GigaSpaces events with the application events, and more.
If the user does not specify a configuration, the default configuration is assumed.
GigaSpaces XAP.NET contains some of the XAP components. Its logging level needs to be configured separately – this is described in the Logging topic of the Administration guide.
The logger component loads the configuration during initialization. If it does not find a source element named
GigaSpaces.Core, it loads a default configuration, which sets the trace level to
Information, and configures an
source=GigaSpaces.Core, (similar to the configuration shown in the basic example).
If the Windows Event Log does not contain the specified source, it is automatically created. However, you need administrator permissions to create a source in the Event Log. If you don't create this source, the default configuration is not used. We recommend that you use an administrator's profile the first time you use the product on a machine, to make sure the source is created. Subsequent runs do not require high level permissions.
Here are some features/scenarios which might be useful:
You can use any of the built-in trace listeners offered by
For more details see Trace Listener.
You can configure a trace listener with a filter to handle specific events.
For more details see: EventTypeFilter Class.
You can implement a custom trace listener to handle traced events in a desired manner (e-mail, SMS, custom log, etc.). If you are planning to do this, we recommend that you examine the implementation of custom trace listeners provided in Microsoft's Logging Application Block as a reference.