LOGS

The VIS provides a route for logging errors, so that they may be categorised properly under the client and API itself.


Log Object

Logs are returned as paginated results, in a collection as shown below:

{
  "pageSize": 10,
  "totalCount": 3
  "results": [    
    {
        "id": 16,
        "callSite": "VuPlatform.VIS.Service.Logging.VISLogging.Log(c:\\DevWork\
            \vualto-ip-videoplatform\\src\\VuPlatform.VIS.Service\\Logging\
            \VISLogging.cs:73)", "date":"2015-07-08T11:54:50Z",
        "exception": "", 
        "level": "Warn", 
        "logger": "VuPlatform.VIS.Service.Logging.VISLogging",
        "machineName": "CHRIS-PC",
        "message": "Event has been deleted with ID 
            2d5336e5-1e30-4ced-bf6a-1bd3a17d2485",
        "stackTrace": "<no type>.lambda_method => EventController.Delete => 
            VISLogging.Log",
        "thread": "14", 
        "username": "IIS APPPOOL\\vualto VIS" 
    },
    {   "id": 17, "callSite": "VuPlatform.VIS.Service.Logging.VISLogging.Log(c:\
            \DevWork\\vualto-ip-videoplatform\\src\\VuPlatform.VIS.Service\\Logging\
            \VISLogging.cs:73)", 
        "date":"2015-07-08T11:55:29Z",
        "exception": "",
        "level": "Warn",
        "logger": "VuPlatform.VIS.Service.Logging.VISLogging", 
        "machineName": "CHRIS-PC", 
        "message":"Event has been deleted with 
            ID 2d5336e5-1e30-4ced-bf6a-1bd3a17d2485",
        "stackTrace": "<no type>.lambda_method 
        => EventController.Delete => VISLogging.Log", 
        "thread":"14",
        "username": "IISAPPPOOL\\vualtoVIS"   
    },   
    {
        "id":18, 
        "callSite":"VuPlatform.VIS.Service.Logging.VISLogging.Log(c:\
            \DevWork\\vualto-ipvideoplatform\\src\\VuPlatform.VIS.Service\\Logging\
            \VISLogging.cs:73)",
        "date": "2015-07-08T11:57:33Z",  
        "exception": "",
        "level": "Warn", 
        "logger": "VuPlatform.VIS.Service.Logging.VISLogging", 
        "machineName": "CHRIS-PC",
        "message": "Event has been deleted with ID: 
            2d5336e5-1e30-4ced-bf6a-1bd3a17d2485. API Key: 
            25f0d858-b112-4fc38498-f1245e95fb2a", 
        "stackTrace":"<notype>.lambda_method => EventController.Delete => 
            VISLogging.Log", "thread":"6","username":
        "IISAPPPOOL\\vualtoVIS"   
    }
]
}

Log Levels:

The following are the accepted log levels within the VIS API:

  Debug
  Error
  Fatal
  Info
  Off
  Trace
  Warn

Supported Actions

POST /log/

Logs a basic message via the VIS API.

Request Body:

{
  "Message": "Log an error or message here",
  "Level": "Info"
}

Response: 201 Created


POST /log/exception/

Logs an exception via the VIS API.

Request Body:

Submit the Exception as the body.

Query Parameters:

Message: {string} - Optional. Additional message or context to log alongside the Exception.

Response: 201 Created


POST /log/loggable/

Logs a generic Loggable model via the VIS API.

Request Body:

{
  "Id": "identifier-here",
  "Message": "loggable message here.",
  "Level": "Info",
  "Tag": [ "vis"]
}

Response: 201 Created


GET /log/

Get logs filtered by the given parameters.

Query Parameters:

StartIndex: {int} - Optional. Defaults to 0.

PageSize: {int} - Optional. Defaults to 20.

FromDate: (string) - Optional. Must be an ISO8601 string.

ToDate: {string} - Optional. Must be an ISO8601 string.

LogLevels: {string} - Optional. Comma separated levels to include.

OrderColumnNamne: {string} - Optional. Defaults to 'Id'.

QueryOrder: {string/QueryOrder} - Optional. Defaults to ascending. 

Response:

200 OK and JSON containing a Log Object.

or

204 No Content if there are no logs found.


GET /log/event/{eventId}

Get logs relevant to a specific Event, filtered by the given parameters.

This request behaves the same as above but with a different route.


GET /log/useraudit/

Get logs relevant to user actions, filtered by the given parameters.

This request behaves the same as above but with a different route.


GET /log/usermanagement/

Get logs relevant to user management actions, filtered by the given parameters.

This request behaves the same as above but with a different route.


GET /log/{id}

Get a specific log by Id.

Response: 200 OK and JSON containing a single Log (refer to results array here).


GET /log/useraudit/{id}

Get a specific useraudit log by Id.

Response: 200 OK and JSON containing a single Log (refer to results array here).