Truncate email request registration in RobotFramework

I use the request library for the robot platform to upload files to the server. RequestsKeywords.py file has a line

    logger.info('Post Request using : alias=%s, uri=%s, data=%s, headers=%s, files=%s, allow_redirects=%s '
                % (alias, uri, dataStr, headers, files, redir))

This displays the contents of my download file inside the request in my log file. Now I can get rid of this log by changing the log level, but my goal is to see the log, but just truncate it to 80 characters, so I do not look at the lines of hexadecimal values. Any idea how this can be done?

+4
source share
1 answer

, , , , RequestsLibrary, , . , .

, , GitHub . , /:

logger.info('Post Request using : alias=%s, uri=%s, data=%s, headers=%s, allow_redirects=%s' % ...
logger.trace('Post Request files : files=%s' % ...

. , Robot Code. script, Robot Framework Listener. , , ReqestsLibrary.

RequestLibrary Post, , .

0

Source: https://habr.com/ru/post/1690102/


All Articles