Set Log Level for Built in Keywords in Robotframework
In Robot Framework, It Looks Like It Logs Messages for Keywords Like "=" by Default with 'Info' Log Level. Ex: ${Xyz} = "Hello" Would Log Message with: 'Info'...
In robot framework, it looks like it logs messages for keywords like "=" by default with 'INFO' log level. Ex:
<Test case>
${xyz} = "hello"
Would log message with:
'INFO': ${xyz} = "hello"
I would like to lower the log level for this to 'DEBUG' or 'TRACE' but can't seem to find it in the source code. An advice for this?
3 Answers
Also, you can set your log level in the code. Like this:
Test Setup Set Log Level TRACE
Then in the log.html file, a visible log level dropdown is shown in the upper right corner. This allows users to remove messages below the chosen level from the view. This can be useful especially when running tests at the TRACE level.
for more information see:
Have you tried to execute the test bringing the whole execution to a deeper level "DEBUG" or "TRACE" adding this -L trace or -L debug to your test call. robot -L trace mytest.robot for instance.
Source code defined like this
def log(self, message, level='INFO', html=False, console=False,
repr=False, formatter='str'):
u"""Logs the given message with the given level.
Valid levels are TRACE, DEBUG, INFO (default), HTML, WARN, and ERROR.
Messages below the current active log level are ignored. See
`Set Log Level` keyword and ``--loglevel`` command line option
for more details about setting the level.
usage example Log you message:{message} level=DEBUG