We use Python's standard logging
module to produce log entries,
with multiple backends pluggable via the configuration.
Most logs are in the DEBUG
and INFO
level.
Main sources of INFO
logs:
-
API requests: Capitalized API names with parenthesis of key arguments, where each argument is formatted as a concatenated string of a variable name shortcut, a colon, and its value.
-
Examples:
VFOLDER.DOWNLOAD (ak:{0}, vf:{1})
with the requester's access key and the name of vfolder.GET_OR_CREATE (ak:{0}/{1}, img:{2}, s:{3})
with the requester's access key and optional owner access key (these are same for normal users but administrators may invoke the API on behalf of the resource owner), the image name, and the client-provided session ID. When the owner access key is same to the requester access key, it is marked as*
.- Superadmin-only APIs do not record the requester access key.
-
The API request logs mostly records the most important parameters, not the result. Some APIs may leave additional logs in a similar format but with additional details found during the request processing. In such cases, additional messages are appended after the closing parenthesis followed by a colon and space.
-
Commonly used variable keys:
ak
: Access key. If include two keys with a slash in the middle, the latter represents the owner access key. Otherwise it represents the API requester's access key.d
: Domain name.g
: Group name or ID.gid
: Group ID.u
: User ID (email).uid
: User UUID.s
: Session ID, which is unique among all pending/live sessions owned by each user. Usually set by the clients.k
: ComputeSession ID, which is globally unique identifier. It is a UUID randomly generated by the manager.sg
: Scaling group.rp
: Resource policy.vf
: Virtual folder name, which is unique for each user. For renaming operations, this may have additional suffixes with a dot, such asvf.old
andvf.new
.vfh
: Host of virtual folder.vfid
: Virtual folder ID, which is a globally unique identifier. It is a UUID randomly generated by the manager.path
: Target path in virtual folders or containers. If the API supports multiple files, this may contain only the first entry.img
: ComputeSession image name.
-
Variable values are usually just a string, but the following variations exist:
[string-value,string-value,...]
: Array of string values, separated by comma and wrapped by square brackets.- Quoted string: a string value formatted using Python's
repr()
function, which may contain escaped (with backslashes) quotation symbols and whitespace characters.
-