LoggingService
LoggingService.Rd
Provides access to logging functionality provided through the web API.
Super class
Myrconn.PetroVisor.Client::ApiRequests
-> LoggingService
Methods
Method new()
Create a new LoggingService instance. This is done by the ServiceProvider automatically.
Usage
LoggingService$new(url, token_type, token)
Method load()
Retrieve all log entries matching the given filter from the database.
Usage
LoggingService$load(
last_entries = NULL,
start = NULL,
end = NULL,
categories = NULL,
user_name = NULL,
severities = NULL,
message_text_filter = NULL,
workflow = NULL,
schedule = NULL
)
Arguments
last_entries
Return only the latest n tag entries.
start
Return log entries after the specified date (inclusive).
end
Return log entries before the specified date (inclusive).
categories
Return log entries of the specified categaories.
user_name
Return log entries of the specified user.
severities
Return log entries of the given severities.
message_text_filter
Return log entries whose massage contains the specified text.
workflow
Return log entries for the specified workflow.
schedule
Return log entries for the specified schedule.
Method save()
Add one or several log entries to the database at once.
Examples
if (FALSE) { # \dontrun{
# create a new instance of the service provider
sp <- ServiceProvider$new("Host", 8095, "WorkspaceA", "UserX", "Password")
# get available categories
availableCategories <- sp$logs$GetAvailableCategories()
# get log entries
allLogEntries <- sp$logs$GetLogEntries()
warnings <- sp$logs$GetLogEntries(severity = "Warning")
signIns <- sp$logs$GetLogEntries(category = "SignIn")
# add log entry
entry <- LogEntry$new(message = "Test",
category = "Tag",
severity = "Information")
sp$logs$AddLogEntry(entry)
# add several log entries at once
entry1 <- LogEntry$new(message = "Test1",
category = "Tag",
severity = "Information")
entry2 <- LogEntry$new(message = "Test2",
category = "Tag",
severity = "Information")
sp$logs$AddLogEntries(list(entry1, entry2))
# remove all log entries
sp$logs$CleanUpLogEntries()
} # }