16 from contextlib
import contextmanager
17 from os.path
import exists, dirname
20 from robot.utils import (attribute_escape, get_link_path, html_escape, is_string,
21 safe_str, timestamp_to_secs)
23 from .expandkeywordmatcher
import ExpandKeywordMatcher
24 from .stringcache
import StringCache
29 def __init__(self, log_path=None, split_log=False, expand_keywords=None,
41 if expand_keywords
else None
43 def string(self, string, escape=True, attr=False):
47 string = (html_escape
if not attr
else attribute_escape)(string)
48 return self.
_strings_strings.add(string)
51 return self.
_strings_strings.add(string, html=
True)
55 if self.
_log_dir_log_dir
and source
and exists(source)
else ''
56 return self.
stringstring(rel_source)
67 if LEVELS[level] < LEVELS[self.
min_levelmin_level]:
79 expand_keywords = property
88 return (msg.message, msg.level, msg.timestamp)
def __init__(self, log_path=None, split_log=False, expand_keywords=None, prune_input=False)
def check_expansion(self, kw)
def timestamp(self, time)
def prune_input(self, *items)
def create_link_target(self, msg)
def start_splitting_if_needed(self, split=False)
def relative_source(self, source)
def message_level(self, level)
def string(self, string, escape=True, attr=False)
def end_splitting(self, model)
def get_link_path(target, base)
Returns a relative path to target from base.
def timestamp_to_secs(timestamp, seps=None)