rrlog - a Rotating Remote LOG. @author: Ruben Reifenberg
Bases: object
Instances of this are callable and represent the runtime interface for the application. @ivar stackMax: See L{__init__}, can be modified anytime. @ivar traceOffset: See L{__init__}, can be modified anytime.
Parameters: |
|
---|---|
Returns: | log-client specific message number,starting with 1 (not unique at server side, if multiple log clients are used.) |
Parameters: |
|
---|
Returns: | Tuple for the log server |
---|---|
Parameters: | depth (int) – log-internal call depth when the traceback was taken. |
Returns: | path,cfuncname where path = ( (filename,lineno), ...), len >=0 cfuncname is “” if no traceback available, None if no cfuncname exists (log call at module level) |
---|---|
Parameters: | depth (int) – log-internal call depth when the traceback was taken. |
Note that, contrary to the Python logging, the rrlog is not designed/tested for threading.
Returns: | Handler for the Python >=2.3 standard logging framework. |
---|
Tip: To obtain the Log instance while using standard logging module, take it from the Logger.handlers list.
Parameters: | asdict – key/value pairs, that this Log object will append to every succeeding log call. Similar to the “special” dict but sticky. Previous “sticked data” are replaced. Example: {“ip”:requests_ip_address} Call with {} to end sticking data. |
---|
Bases: object
Use this as errorHandler if you want log errors to disappear silently (e.g.in case of a Log Server Crash). Not recommended (but preferred over an exception in the log() call stopping the application).
make .pyc files beside the rrlog .py files immediately
constants about the environment (SQLAlchemy) available Purpose: provide compatibility with a wide SQLAlchemy version range @author: Ruben Reifenberg
@summary: Integration into Python 2.3 logging as a Handler @author: Ruben Reifenberg @var LEVELMAP: 1:1 mapping of single characters (Like “E”) to the level constants of the standard logging module; {logging-level: Category-Character}. You may modify this.
Bases: logging.Handler
@summary: Tools not specific for logging purpose @author: Ruben Reifenberg
Bases: object
Iteriert durch eine gegebene Liste, beginnend mit erstem Element. beginnt im Gegensatz zum Iterator wieder von vorn. @ivar i: index of last returned element
Bases: object
Create a String consisting of “depth” identical tokens. Intended for output indention.
How many elements to cut away from something with len l, when we want restlen+len(decimal-digit-of-cut-count) < max? :rtype: int :returns: count of chars to cut away (cutcount) (can be > l when max is too low)
Limited Unicode To Ascii (limited: the result length is limited) Intended for ASCII-logging of untrusted (e.g.user input) unicode strings. The length limitation is intended for storage in length-limited ASCII Database fields. :rtype: ASCII str or None :returns: The argument but with: All non-ascii chars replaced by “xhexvalue”. If N chars (of the result string) are thrown away, “[N+]” is appened at the end. :param unistr: Python Unicode or None :param max: >=3, length limit of the RESULT STRING (default 50) :param errorstr: Returned in case max is too low to return the regular result.
Note: In case of unistr containing non-ascii characters, this method gets slow (because it does a python loop over each character.) @see: lu2a Additionally, the german umlauts are replaced by AE,OE... to make it more readable (by the drawback of information loss, of course.)
Parameters: |
|
---|---|
Returns: | str, made by dt.strftime |
Send subject/content, as latin-1 by default String-Parameter; subject/content may be unicode or str.
Returns: | None |
---|---|
Parameters: |
|
Parameters: |
|
---|---|
Returns: | str, made by time.strftime |
Parameters: |
|
---|---|
Returns: | short str describing the current ex.stacktrace (end-first), “” if there is no current exc. |
@summary: The client (i.e.application) side of an XMLRPC log connection. @author: Ruben Reifenberg
Bases: object
First method call must be addClient, since this establishes the server connection.
Bases: rrlog.xmlrpc.XMLRPCLogException
Logging went wrong because of a connection issue.
Bases: rrlog.xmlrpc.XMLRPCLogException
Logging went wrong because the server had a problem.
Steve Holden,http://www.velocityreviews.com/forums/t539476-xml-rpc-timeout.html: The easiest way is to use socket.setdefaulttimeout() to establish a longer timeout period for all sockets, I guess. It’s difficult to establish different timeouts for individual sockets when they aren’t opened directly by your own code (though each socket does also have a method to set its timeout period). — Sh...We must not modify sockets globally in a library like rrlog. We can’t use signal, since we usualy don’t have the main thread. We can’t rely on a specific Python version and OS which would enable more solutions. The xmlrpc lib should be more cooperative :-( => No timeout solution currently.