You can send logs to railtown.ai by issuing a POST request to your personal railtown.ai logs endpoint.
The payload for the request is a JSON array of log messages. Each message should contain:
To see sample payloads for each of your environments and your personal endpoint, please see the Environments section of the Configure Project page.
Name | Type | Description | Example |
---|---|---|---|
Level | number | Trace = 0, Debug = 1, Info = 2, Warn = 3, Error = 4, Fatal = 5 | 4 |
Message | string | The log message | An unhandled exception has occurred while executing the request. |
TimeStamp | datetime | the time the log was generated in ISO 8601 (round trip) format | 2022-11-23T18:39:35.8283321+00:00 |
Runtime | string | dotnet-csharp, v8-javascript or node-javascript, python-traceback | dotnet-csharp |
OrganizationId | string | Your organization Id | [Use the value provided in the example payload] |
ProjectId | string | Your project Id | [Use the value provided in the example payload for your project] |
EnvironmentId | string | The Id of the environment that is generating the log | [Use the value provided in the example payload for your environment] |
Name | Type | Description | Example |
---|---|---|---|
Exception | string | String representation of an exception with a stack trace. For C# this should be the equivalent of Exception.ToString() | System.OutOfMemoryException: Insufficient memory to continue the execution of the program. |
at Program.Main() in C:\\code\\Program.cs:line 42 |
| Properties | key value pairs | Additional properties of the message. For example: trace Id, span Id, request context, url | { "YourProperty1":"YourValue1", "YourProperty2":”YourValue2” } |