Package s3 :: Module s3sync :: Class S3SyncLog
[frames] | no frames]

Class S3SyncLog

source code

     object --+    
              |    
s3rest.S3Method --+
                  |
                 S3SyncLog

Synchronization Logger

Instance Methods
 
apply_method(self, r, **attr)
RESTful method handler
source code

Inherited from s3rest.S3Method: __call__, widget

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods
 
write(cls, repository_id=None, resource_name=None, transmission=None, mode=None, action=None, result=None, remote=False, message=None)
Writes a new entry to the log
source code
Static Methods
 
rheader(r, **attr)
S3SyncLog resource header
source code

Inherited from s3rest.S3Method: crud_string

Class Variables
  TABLENAME = "sync_log"
  SUCCESS = "success"
  WARNING = "warning"
  ERROR = "error"
  FATAL = "fatal"
  IN = "incoming"
  OUT = "outgoing"
  PULL = "pull"
  PUSH = "push"
  LOGIN = "login"
  REGISTER = "register"
  NONE = "none"
Properties

Inherited from object: __class__

Method Details

apply_method(self, r, **attr)

source code 

RESTful method handler

Parameters:
  • r - the S3Request instance
  • attr - controller attributes for the request
Returns:
output object to send to the view
Overrides: s3rest.S3Method.apply_method

write(cls, repository_id=None, resource_name=None, transmission=None, mode=None, action=None, result=None, remote=False, message=None)
Class Method

source code 

Writes a new entry to the log

Parameters:
  • repository_id - the repository record ID
  • resource_name - the resource name
  • transmission - transmission mode (IN, OUT or None)
  • mode - synchronization mode (PULL, PUSH or None)
  • action - action that triggers the log entry (if any)
  • result - the result of the transaction (SUCCESS, WARNING, ERROR or FATAL)
  • remote - boolean, True if this is a remote error
  • message - clear text message

rheader(r, **attr)
Static Method

source code 

S3SyncLog resource header


Class Variable Details

TABLENAME

Value:
"sync_log"

SUCCESS

Value:
"success"

WARNING

Value:
"warning"

ERROR

Value:
"error"

FATAL

Value:
"fatal"

IN

Value:
"incoming"

OUT

Value:
"outgoing"

PULL

Value:
"pull"

PUSH

Value:
"push"

LOGIN

Value:
"login"

REGISTER

Value:
"register"

NONE

Value:
"none"