OSID Logo
OSID Specifications
logging package
Version 3.0.0
Release Candidate Preview
Interfaceosid.logging.LoggingSession
Implementsosid.OsidSession
Description

This session is used to log entries to a log.

MethodgetLogId
Description

Gets the Log Id associated with this session.

Returnosid.id.Idthe Log Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetLog
Description

Gets the Log associated with this session.

Returnosid.logging.Logthe log
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanLog
Description

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 PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer logging operations.

Returnboolean false if logging methods are not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
Methodlog
Description

Logs an item. This method is a shortcut to createLogEntry().

Parametersobjectcontentthe entry to log
osid.type.TypecontentTypethe type of this entry which must be one of the types returned by LoggingManager.getContentTypes()
ErrorsINVALID_ARGUMENT content is not of contentType
NULL_ARGUMENT content or contentType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED LoggingManager.supportsContentType(contentType) is false
CompliancemandatoryThis method must be implemented.
MethodlogAtPriority
Description

Logs an item.

Parametersosid.type.TypepriorityTypethe entry priority
objectcontentthe entry to log
osid.type.TypecontentTypethe type of this entry which must be one of the types returned by LoggingManager.getContentTypes()
ErrorsINVALID_ARGUMENT content is not of contentType
NULL_ARGUMENT content , contentType or priorityType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED LoggingManager.supportsContentType(contentType) is false or LoggingManager.supportsPriorityType(priorityType) is false
CompliancemandatoryThis method must be implemented.
MethodgetLogEntryForm
Description

Gets a log entry form for creating a log entry.

Returnosid.logging.LogEntryFormthe log entry form
CompliancemandatoryThis method must be implemented.
MethodcreateLogEntry
Description

Logs an entry through the log entry form.

Parametersosid.logging.LogEntryFormlogEntryFormthe log entry form
ErrorsINVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT logEntryForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED logEntryForm is not of this service
CompliancemandatoryThis method must be implemented.