LOGS

The VIS provides a route for reporting 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.

Note: Submit the Exception as the body of the request.

Query Parameters:

Name Type Required Description
message String No 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:

Name Type Required Description
startIndex int No Defaults to 0.
pageSize int No Number of results to fetch per Page.
fromDate ISO8601 String No The Date to filter from.
toDate ISO8601 String No The Date to filter to.
logLevels String No Comma separated log levels to include.
orderColumnName String No Defaults to 'id'.
queryOrder QueryOrder No The order to sort by, either ASC or DESC. Defaults to ASC.

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