Logging Open Service Interface Definitions logging version 3.0.0

The Logging OSID provides a means to read and wite to logs. A Log represents a collection of log entries. Each log entry is composed of a priority Type, timestamp, Agent, the agent’s associated Resource, and a record.

Logs can be organized into hierarchies for federation. A log that is a parent of another log makes visible the log entries of its children.

Example

LoggingSession out = manager.getLoggingSession(); out.log(warningLogEntryPriorityType, “hello world”, stringLogEntryContentType);

LogReadingSession in = manager.getLogReadingSession(); LogEntryList entries = inn.getLogEntries(); while (entries.hasNext()) {

LogEntry entry = entries.getNextLogEntry(); printEntry(entry);

}

Service Managers

Logging Profile

class dlkit.services.logging_.LoggingProfile

Bases: dlkit.osid.managers.OsidProfile

The logging profile describes the interoperability among logging services.

supports_logging()

Tests if logging is supported.

Returns:true if logging is supported, false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

supports_log_entry_lookup()

Tests if reading logs is supported.

Returns:true if reading logs is supported, false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

supports_log_entry_query()

Tests if querying log entries is supported.

Returns:true if querying log entries is supported, false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

supports_log_lookup()

Tests for the availability of a log lookup service.

Returns:true if log lookup is available, false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

supports_log_admin()

Tests for the availability of a log administrative service for creating and deleting logs.

Returns:true if log administration is available, false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

log_entry_record_types

Gets the supported Log record types.

Returns:a list containing the supported log record types
Return type:osid.type.TypeList

compliance: mandatory – This method must be implemented.

log_entry_search_record_types

Gets the supported log entry search record types.

Returns:a list containing the supported log entry search record types
Return type:osid.type.TypeList

compliance: mandatory – This method must be implemented.

log_record_types

Gets the supported Log record types.

Returns:a list containing the supported log record types
Return type:osid.type.TypeList

compliance: mandatory – This method must be implemented.

log_search_record_types

Gets the supported log search record types.

Returns:a list containing the supported log search record types
Return type:osid.type.TypeList

compliance: mandatory – This method must be implemented.

priority_types

Gets the priority types supported, in ascending order of the priority level.

Returns:a list containing the supported priority types
Return type:osid.type.TypeList

compliance: mandatory – This method must be implemented.

content_types

Gets the content types supported.

Returns:a list containing the supported content types
Return type:osid.type.TypeList

compliance: mandatory – This method must be implemented.

supports_log_entry_admin()

Tests if log entry admin is supported.

Returns:true if log entry admin is supported, false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

Logging Manager

class dlkit.services.logging_.LoggingManager(proxy=None)

Bases: dlkit.osid.managers.OsidManager, dlkit.osid.sessions.OsidSession, dlkit.services.logging_.LoggingProfile

The logging manager provides access to logging sessions and provides interoperability tests for various aspects of this service.

The sessions included in this manager are:

  • LoggingSession: a session to write to a log
  • LogEntryLookupSession: a session to read a log
  • LogEntryQuerySession: a session to search a log
  • LogEntrySearchSession: a session to search a log
  • LogEntryAdminSession: a session to manage log entries in a log
  • LogEntryNotificationSession: a session to subscribe to notifications of new log entries
  • LogEntryLogSession: a session to examine log entry to log mappings
  • LogEntryLogAssignmentSession: a session to manage log entry to log mappings
  • LogEntrySmartLogSession: a session to manage dynamic logs
  • LogLookupSession: a session to retrieve log objects
  • LogQuerySession: a session to search for logs
  • LogSearchSession: a session to search for logs
  • LogAdminSession: a session to create, update and delete logs
  • LogNotificationSession: a session to receive notifications for changes in logs
  • LogHierarchyTraversalSession: a session to traverse hierarchies of logs
  • LogHierarchyDesignSession: a session to manage hierarchies of logs

The logging manager also provides a profile for determing the supported search types supported by this service.

logging_batch_manager

Gets a LoggingBatchManager.

Returns:a LoggingBatchManager
Return type:osid.logging.batch.LoggingBatchManager
Raise:OperationFailed – unable to complete request
Raise:Unimplementedsupports_logging_batch() is false

compliance: optional – This method must be implemented if ``supports_logging_batch()`` is ``true``.

Logging Methods

LoggingManager.log_id

Gets the Log Id associated with this session.

Returns:the Log Id associated with this session
Return type:osid.id.Id

compliance: mandatory – This method must be implemented.

LoggingManager.log

Gets the Log associated with this session.

Returns:the Log associated with this session
Return type:osid.logging.Log
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

LoggingManager.can_log()

Tests if this user can log.

A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PermissionDenied. This is intended as a hint to an application that may opt not to offer logging operations.

Returns:false if logging methods are not authorized, true otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

LoggingManager.log()

Gets the Log associated with this session.

Returns:the Log associated with this session
Return type:osid.logging.Log
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

LoggingManager.log_at_priority(priority_type, content, content_type)

Logs an item.

Parameters:
  • priority_type (osid.type.Type) – the entry priority
  • content (object) – the entry to log
  • content_type (osid.type.Type) – the type of this entry which must be one of the types returned by LoggingManager.getContentTypes()
Raise:

InvalidArgumentcontent is not of content_type

Raise:

NullArgumentcontent , content_type or priority_type is null

Raise:

OperationFailed – unable to complete request

Raise:

PermissionDenied – authorization failure

Raise:

UnsupportedLoggingManager.supportsContentType(contentType) is false or LoggingManager.supportsPriorityType(priorityType) is false

compliance: mandatory – This method must be implemented.

LoggingManager.log_entry_form

Gets a log entry form for creating a log entry.

Returns:the log entry form
Return type:osid.logging.LogEntryForm

compliance: mandatory – This method must be implemented.

LoggingManager.create_log_entry(log_entry_form)

Creates a new LogEntry.

Parameters:log_entry_form (osid.logging.LogEntryForm) – the form for this LogEntry
Returns:the new LogEntry
Return type:osid.logging.LogEntry
Raise:IllegalStatelog_entry_form already used in a create transaction
Raise:InvalidArgument – one or more of the form elements is invalid
Raise:NullArgumentlog_entry_form is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure
Raise:Unsupportedlog_entry_form did not originate from get_log_entry_form_for_create()

compliance: mandatory – This method must be implemented.

Log Entry Lookup Methods

LoggingManager.log_id

Gets the Log Id associated with this session.

Returns:the Log Id associated with this session
Return type:osid.id.Id

compliance: mandatory – This method must be implemented.

LoggingManager.log

Gets the Log associated with this session.

Returns:the Log associated with this session
Return type:osid.logging.Log
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

LoggingManager.can_read_log()

Tests if this user can read the log.

A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PermissionDenied. This is intended as a hint to an application that may opt not to offer reading operations.

Returns:false if reading methods are not authorized, true otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

LoggingManager.use_comparative_log_entry_view()

The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error.

This view is used when greater interoperability is desired at the expense of precision.

compliance: mandatory – This method is must be implemented.

LoggingManager.use_plenary_log_entry_view()

A complete view of the LogEntry returns is desired.

Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.

compliance: mandatory – This method is must be implemented.

LoggingManager.use_federated_log_view()

Federates the view for methods in this session.

A federated view will include entries in logs which are children of this log in the log hierarchy.

compliance: mandatory – This method is must be implemented.

LoggingManager.use_isolated_log_view()

Isolates the view for methods in this session.

An isolated view restricts lookups to this log only.

compliance: mandatory – This method is must be implemented.

LoggingManager.get_log_entry(log_entry_id)

Gets the LogEntry specified by its Id.

In plenary mode, the exact Id is found or a NotFound results. Otherwise, the returned LogEntry may have a different Id than requested, such as the case where a duplicate Id was assigned to a LogEntry and retained for compatibility.

Parameters:log_entry_id (osid.id.Id) – the Id of the LogEntry to retrieve
Returns:the returned LogEntry
Return type:osid.logging.LogEntry
Raise:NotFound – no LogEntry found with the given Id
Raise:NullArgumentlog_entry_id is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

LoggingManager.get_log_entries_by_ids(log_entry_ids)

Gets a LogEntryList corresponding to the given IdList.

In plenary mode, the returned list contains all of the entries specified in the Id list, in the order of the list, including duplicates, or an error results if an Id in the supplied list is not found or inaccessible. Otherwise, inaccessible logentries may be omitted from the list and may present the elements in any order including returning a unique set.

Parameters:log_entry_ids (osid.id.IdList) – the list of Ids to retrieve
Returns:the returned LogEntry list
Return type:osid.logging.LogEntryList
Raise:NotFound – an Id was not found
Raise:NullArgumentlog_entry_ids is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

LoggingManager.get_log_entries_by_genus_type(log_entry_genus_type)

Gets a LogEntryList corresponding to the given log entry genus Type which doe snot include entries of genus types derived form the specified Type.

In plenary mode, the returned list contains all known entries or an error results. Otherwise, the returned list may contain only those entries that are accessible through this session

Parameters:log_entry_genus_type (osid.type.Type) – a log entry genus type
Returns:the returned LogEntry list
Return type:osid.logging.LogEntryList
Raise:NullArgumentlog_entry_genus_type is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

LoggingManager.get_log_entries_by_parent_genus_type(log_entry_genus_type)

Gets a LogEntryList corresponding to the given log entry genus Type and include any additional entries with genus types derived from the specified Type.

In plenary mode, the returned list contains all known entries or an error results. Otherwise, the returned list may contain only those entries that are accessible through this session.

Parameters:log_entry_genus_type (osid.type.Type) – a log entry genus type
Returns:the returned LogEntry list
Return type:osid.logging.LogEntryList
Raise:NullArgumentlog_entry_genus_type is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

LoggingManager.get_log_entries_by_record_type(log_entry_genus_type)

Gets a LogEntryList containing the given log entry record Type.

In plenary mode, the returned list contains all known log entries or an error results. Otherwise, the returned list may contain only those log entries that are accessible through this session.

Parameters:log_entry_genus_type (osid.type.Type) – a log entry genus type
Returns:the returned LogEntry list
Return type:osid.logging.LogEntryList
Raise:NullArgumentlog_entry_genus_type is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

LoggingManager.get_log_entries_by_priority_type(priority_type)

Gets a LogEntryList filtering the list to log entries including and above the given priority Type.

In plenary mode, the returned list contains all known entries or an error results. Otherwise, the returned list may contain only those entries that are accessible through this session.

Parameters:priority_type (osid.type.Type) – a log entry priority type
Returns:the returned LogEntry list
Return type:osid.logging.LogEntryList
Raise:NullArgumentpriority_type is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

LoggingManager.get_log_entries_by_date(start, end)

Gets a LogEntryList corresponding to the given time interval inclusive.

In plenary mode, the returned list contains all known entries or an error results. Otherwise, the returned list may contain only those entries that are accessible through this session.

Parameters:
  • start (osid.calendaring.DateTime) – a starting time
  • end (osid.calendaring.DateTime) – a starting time
Returns:

the returned LogEntry list

Return type:

osid.logging.LogEntryList

Raise:

InvalidArgumentstart is greater than end

Raise:

NullArgumentstart or end is null

Raise:

OperationFailed – unable to complete request

Raise:

PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

LoggingManager.get_log_entries_by_priority_type_and_date(priority_type, start, end)

Gets a LogEntryList corresponding to the given time interval inclusive filtering the list to log entries including and above the given priority Type.

In plenary mode, the returned list contains all known entries or an error results. Otherwise, the returned list may contain only those entries that are accessible through this session.

Parameters:
  • priority_type (osid.type.Type) – a log entry priority type
  • start (osid.calendaring.DateTime) – a starting time
  • end (osid.calendaring.DateTime) – a starting time
Returns:

the returned LogEntry list

Return type:

osid.logging.LogEntryList

Raise:

InvalidArgumentstart is greater than end

Raise:

NullArgumentpriority_type, start or end is null

Raise:

OperationFailed – unable to complete request

Raise:

PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

LoggingManager.get_log_entries_for_resource(resource_id)

Gets a LogEntryList for an agent associated with the given resource.

In plenary mode, the returned list contains all known entries or an error results. Otherwise, the returned list may contain only those entries that are accessible through this session.

Parameters:resource_id (osid.id.Id) – a resource Id
Returns:the returned LogEntry list
Return type:osid.logging.LogEntryList
Raise:NullArgumentresource_id is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

LoggingManager.get_log_entries_by_date_for_resource(resource_id, start, end)

Gets a LogEntryList corresponding to the given time interval inclusive for an agent associated with the given resource.

In plenary mode, the returned list contains all known entries or an error results. Otherwise, the returned list may contain only those entries that are accessible through this session.

Parameters:
  • resource_id (osid.id.Id) – a resource Id
  • start (osid.calendaring.DateTime) – a starting time
  • end (osid.calendaring.DateTime) – a starting time
Returns:

the returned LogEntry list

Return type:

osid.logging.LogEntryList

Raise:

InvalidArgumentstart is greater than end

Raise:

NullArgumentresource_id, start or end is null

Raise:

OperationFailed – unable to complete request

Raise:

PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

LoggingManager.get_log_entries_by_priority_type_and_date_for_resource(resource_id, priority_type, start, end)

Gets a LogEntryList corresponding to the given time interval inclusive for an agent associated with the given resource filtering the list to log entries including and above the given priority Type.

In plenary mode, the returned list contains all known entries or an error results. Otherwise, the returned list may contain only those entries that are accessible through this session.

Parameters:
  • resource_id (osid.id.Id) – a resource Id
  • priority_type (osid.type.Type) – a log entry priority type
  • start (osid.calendaring.DateTime) – a starting time
  • end (osid.calendaring.DateTime) – a starting time
Returns:

the returned LogEntry list

Return type:

osid.logging.LogEntryList

Raise:

InvalidArgumentstart is greater than end

Raise:

NullArgumentresource_id, priority_type, start or end is null

Raise:

OperationFailed – unable to complete request

Raise:

PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

LoggingManager.log_entries

Gets all log entries.

In plenary mode, the returned list contains all known entries or an error results. Otherwise, the returned list may contain only those entries that are accessible through this session.

Returns:a list of log entries
Return type:osid.logging.LogEntryList
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Log Entry Query Methods

LoggingManager.log_id

Gets the Log Id associated with this session.

Returns:the Log Id associated with this session
Return type:osid.id.Id

compliance: mandatory – This method must be implemented.

LoggingManager.log

Gets the Log associated with this session.

Returns:the Log associated with this session
Return type:osid.logging.Log
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

LoggingManager.can_search_log_entries()

Tests if this user can perform LogEntry searches.

A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PermissionDenied. This is intended as a hint to an application that may opt not to offer search operations to unauthorized users.

Returns:false if search methods are not authorized, true otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

LoggingManager.use_federated_log_view()

Federates the view for methods in this session.

A federated view will include entries in logs which are children of this log in the log hierarchy.

compliance: mandatory – This method is must be implemented.

LoggingManager.use_isolated_log_view()

Isolates the view for methods in this session.

An isolated view restricts lookups to this log only.

compliance: mandatory – This method is must be implemented.

LoggingManager.log_entry_query

Gets a log entry query.

Returns:the log entry query
Return type:osid.logging.LogEntryQuery

compliance: mandatory – This method must be implemented.

LoggingManager.get_log_entries_by_query(log_entry_query)

Gets a list of log entries matching the given log entry query.

Parameters:log_entry_query (osid.logging.LogEntryQuery) – the log entry query
Returns:the returned LogEntryList
Return type:osid.logging.LogEntryList
Raise:NullArgumentlog_entry_query is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure
Raise:Unsupportedlog_entry_query is not of this service

compliance: mandatory – This method must be implemented.

Log Entry Admin Methods

LoggingManager.log_id

Gets the Log Id associated with this session.

Returns:the Log Id associated with this session
Return type:osid.id.Id

compliance: mandatory – This method must be implemented.

LoggingManager.log

Gets the Log associated with this session.

Returns:the Log associated with this session
Return type:osid.logging.Log
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

LoggingManager.can_create_log_entries()

Tests if this user can create log entries.

A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a LogEntry will result in a PermissionDenied. This is intended as a hint to an application that may not wish to offer create operations to unauthorized users.

Returns:false if LogEntry creation is not authorized, true otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

LoggingManager.can_create_log_entry_with_record_types(log_entry_record_types)

Tests if this user can create a single LogEntry using the desired record types.

While LoggingManager.getLogEntryRecordTypes() can be used to examine which records are supported, this method tests which record(s) are required for creating a specific LogEntry. Providing an empty array tests if a LogEntry can be created with no records.

Parameters:log_entry_record_types (osid.type.Type[]) – array of log entry record types
Returns:true if LogEntry creation using the specified record Types is supported, false otherwise
Return type:boolean
Raise:NullArgumentlog_entry_record_types is null

compliance: mandatory – This method must be implemented.

LoggingManager.get_log_entry_form_for_create(log_entry_record_types)

Gets the log entry form for creating new log entries.

A new form should be requested for each create transaction.

Parameters:log_entry_record_types (osid.type.Type[]) – array of log entry record types
Returns:the log entry form
Return type:osid.logging.LogEntryForm
Raise:NullArgumentlog_entry_record_types is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure
Raise:Unsupported – unable to get form for requested record types

compliance: mandatory – This method must be implemented.

LoggingManager.create_log_entry(log_entry_form)

Creates a new LogEntry.

Parameters:log_entry_form (osid.logging.LogEntryForm) – the form for this LogEntry
Returns:the new LogEntry
Return type:osid.logging.LogEntry
Raise:IllegalStatelog_entry_form already used in a create transaction
Raise:InvalidArgument – one or more of the form elements is invalid
Raise:NullArgumentlog_entry_form is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure
Raise:Unsupportedlog_entry_form did not originate from get_log_entry_form_for_create()

compliance: mandatory – This method must be implemented.

LoggingManager.can_update_log_entries()

Tests if this user can update log entries.

A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a Log will result in a PermissionDenied. This is intended as a hint to an application that may not wish to offer update operations to unauthorized users.

Returns:false if LogEntry modification is not authorized, true otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

LoggingManager.get_log_entry_form_for_update(log_entry_id)

Gets the log entry form for updating an existing log.

A new log entry form should be requested for each update transaction.

Parameters:log_entry_id (osid.id.Id) – the Id of the LogEntry
Returns:the log entry form
Return type:osid.logging.LogEntryForm
Raise:NotFoundlog_entry_id is not found
Raise:NullArgumentlog_entry_id is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

LoggingManager.update_log_entry(log_entry_form)

Updates an existing log entry.

Parameters:log_entry_form (osid.logging.LogEntryForm) – the form containing the elements to be updated
Raise:IllegalStatelog_entry_form already used in an update transaction
Raise:InvalidArgument – the form contains an invalid value
Raise:NullArgumentlog_entry_form is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure
Raise:Unsupportedlog_entry_form did not originate from get_log_entry_form_for_update()

compliance: mandatory – This method must be implemented.

LoggingManager.can_delete_log_entries()

Tests if this user can delete log entries.

A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a LogEntry will result in a PermissionDenied. This is intended as a hint to an application that may not wish to offer delete operations to unauthorized users.

Returns:false if LogEntry deletion is not authorized, true otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

LoggingManager.delete_log_entry(log_entry_id)

Deletes a LogEntry.

Parameters:log_entry_id (osid.id.Id) – the Id of the log_entry_id to remove
Raise:NotFoundlog_entry_id not found
Raise:NullArgumentlog_entry_id is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

LoggingManager.can_manage_log_entry_aliases()

Tests if this user can manage Id aliases for log entries.

A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in a PermissionDenied. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.

Returns:false if LogEntry aliasing is not authorized, true otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

LoggingManager.alias_log_entry(log_entry_id, alias_id)

Adds an Id to a LogEntry for the purpose of creating compatibility.

The primary Id of the LogEntry is determined by the provider. The new Id performs as an alias to the primary Id. If the alias is a pointer to another log entry, it is reassigned to the given log entry Id.

Parameters:
  • log_entry_id (osid.id.Id) – the Id of a LogEntry
  • alias_id (osid.id.Id) – the alias Id
Raise:

AlreadyExistsalias_id is already assigned

Raise:

NotFoundlog_entry_id not found

Raise:

NullArgumentlog_entry_id or alias_id is null

Raise:

OperationFailed – unable to complete request

Raise:

PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Log Lookup Methods

LoggingManager.can_lookup_logs()

Tests if this user can perform Log lookups.

A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PermissionDenied. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.

Returns:false if lookup methods are not authorized, true otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

LoggingManager.use_comparative_log_view()

The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error.

This view is used when greater interoperability is desired at the expense of precision.

compliance: mandatory – This method is must be implemented.

LoggingManager.use_plenary_log_view()

A complete view of the Log returns is desired.

Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.

compliance: mandatory – This method is must be implemented.

LoggingManager.get_log(log_id)

Gets the Log specified by its Id.

In plenary mode, the exact Id is found or a NotFound results. Otherwise, the returned Log may have a different Id than requested, such as the case where a duplicate Id was assigned to a Log and retained for compatibility.

Parameters:log_id (osid.id.Id) – Id of the Log
Returns:the log
Return type:osid.logging.Log
Raise:NotFoundlog_id not found
Raise:NullArgumentlog_id is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method is must be implemented.

LoggingManager.get_logs_by_ids(log_ids)

Gets a LogList corresponding to the given IdList.

In plenary mode, the returned list contains all of the logs specified in the Id list, in the order of the list, including duplicates, or an error results if an Id in the supplied list is not found or inaccessible. Otherwise, inaccessible Logs may be omitted from the list and may present the elements in any order including returning a unique set.

Parameters:log_ids (osid.id.IdList) – the list of Ids to retrieve
Returns:the returned Log list
Return type:osid.logging.LogList
Raise:NotFound – an Id was not found
Raise:NullArgumentlog_ids is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

LoggingManager.get_logs_by_genus_type(log_genus_type)

Gets a LogList corresponding to the given log genus Type which does not include logs of genus types derived from the specified Type.

In plenary mode, the returned list contains all known logs or an error results. Otherwise, the returned list may contain only those logs that are accessible through this session.

Parameters:log_genus_type (osid.type.Type) – a log genus type
Returns:the returned Log list
Return type:osid.logging.LogList
Raise:NullArgumentlog_genus_type is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

LoggingManager.get_logs_by_parent_genus_type(log_genus_type)

Gets a LogList corresponding to the given log genus Type and include any additional logs with genus types derived from the specified Type.

In plenary mode, the returned list contains all known logs or an error results. Otherwise, the returned list may contain only those logs that are accessible through this session.

Parameters:log_genus_type (osid.type.Type) – a log genus type
Returns:the returned Log list
Return type:osid.logging.LogList
Raise:NullArgumentlog_genus_type is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

LoggingManager.get_logs_by_record_type(log_record_type)

Gets a LogList containing the given log record Type.

In plenary mode, the returned list contains all known logs or an error results. Otherwise, the returned list may contain only those logs that are accessible through this session.

Parameters:log_record_type (osid.type.Type) – a log record type
Returns:the returned Log list
Return type:osid.logging.LogList
Raise:NullArgumentlog_record_type is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

LoggingManager.get_logs_by_provider(resource_id)

Gets a LogList for a given provider.

In plenary mode, the returned list contains all known logs or an error results. Otherwise, the returned list may contain only those logs that are accessible through this session.

Parameters:resource_id (osid.id.Id) – a resource Id
Returns:the returned Log list
Return type:osid.logging.LogList
Raise:NullArgumentresource_id is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

LoggingManager.logs

Gets all Logs.

In plenary mode, the returned list contains all known logs or an error results. Otherwise, the returned list may contain only those logs that are accessible through this session.

Returns:a list of Logs
Return type:osid.logging.LogList
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Log Admin Methods

LoggingManager.can_create_logs()

Tests if this user can create Logs.

A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a Log will result in a PermissionDenied. This is intended as a hint to an application that may not wish to offer create operations to unauthorized users.

Returns:false if Log creation is not authorized, true otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

LoggingManager.can_create_log_with_record_types(log_record_types)

Tests if this user can create a single Log using the desired record types.

While LoggingManager.getLogRecordTypes() can be used to examine which records are supported, this method tests which record(s) are required for creating a specific Log. Providing an empty array tests if a Log can be created with no records.

Parameters:log_record_types (osid.type.Type[]) – array of log record types
Returns:true if Log creation using the specified record Types is supported, false otherwise
Return type:boolean
Raise:NullArgumentlog_record_types is null

compliance: mandatory – This method must be implemented.

LoggingManager.get_log_form_for_create(log_record_types)

Gets the log form for creating new logs.

A new form should be requested for each create transaction.

Parameters:log_record_types (osid.type.Type[]) – array of log record types
Returns:the log form
Return type:osid.logging.LogForm
Raise:NullArgumentlog_record_types is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure
Raise:Unsupported – unable to get form with requested record types

compliance: mandatory – This method must be implemented.

LoggingManager.create_log(log_form)

Creates a new Log.

Parameters:log_form (osid.logging.LogForm) – the form for this Log
Returns:the new Log
Return type:osid.logging.Log
Raise:IllegalStatelog_form already used in a create transaction
Raise:InvalidArgument – one or more of the form elements is invalid
Raise:NullArgumentlog_form is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure
Raise:Unsupportedlog_form did not originate from get_log_form_for_create()

compliance: mandatory – This method must be implemented.

LoggingManager.can_update_logs()

Tests if this user can update Logs.

A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a Log will result in a PermissionDenied. This is intended as a hint to an application that may not wish to offer update operations to unauthorized users.

Returns:false if Log modification is not authorized, true otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

LoggingManager.get_log_form_for_update(log_id)

Gets the log form for updating an existing log.

A new log form should be requested for each update transaction.

Parameters:log_id (osid.id.Id) – the Id of the Log
Returns:the log form
Return type:osid.logging.LogForm
Raise:NotFoundlog_id is not found
Raise:NullArgumentlog_id is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

LoggingManager.update_log(log_form)

Updates an existing log.

Parameters:log_form (osid.logging.LogForm) – the form containing the elements to be updated
Raise:IllegalStatelog_form already used in an update transaction
Raise:InvalidArgument – the form contains an invalid value
Raise:NullArgumentlog_id or log_form is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure
Raise:Unsupportedlog_form did not originate from get_log_form_for_update()

compliance: mandatory – This method must be implemented.

LoggingManager.can_delete_logs()

Tests if this user can delete Logs.

A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a Log will result in a PermissionDenied. This is intended as a hint to an application that may not wish to offer delete operations to unauthorized users.

Returns:false if Log deletion is not authorized, true otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

LoggingManager.delete_log(log_id)

Deletes a Log.

Parameters:log_id (osid.id.Id) – the Id of the Log to remove
Raise:NotFoundlog_id not found
Raise:NullArgumentlog_id is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

LoggingManager.can_manage_log_aliases()

Tests if this user can manage Id aliases for Logs.

A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in a PermissionDenied. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.

Returns:false if Log aliasing is not authorized, true otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

LoggingManager.alias_log(log_id, alias_id)

Adds an Id to a Log for the purpose of creating compatibility.

The primary Id of the Log is determined by the provider. The new Id performs as an alias to the primary Id. If the alias is a pointer to another log, it is reassigned to the given log Id.

Parameters:
  • log_id (osid.id.Id) – the Id of a Log
  • alias_id (osid.id.Id) – the alias Id
Raise:

AlreadyExistsalias_id is already assigned

Raise:

NotFoundlog_id not found

Raise:

NullArgumentlog_id or alias_id is null

Raise:

OperationFailed – unable to complete request

Raise:

PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.