from robot.api import logger
No handlers could be found for logger "RobotFramework"
--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at http://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/d/optout.
Ugh
I can share that part of the code. I am away from my PC but later today or Monday
-Tatu
Send from my mobile
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsub...@googlegroups.com.
To post to this group, send email to robotframework-users@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.
Ugh
Sorry, I haven't seen that problem. I use listeners but I don't use BuiltIn from the listener. Would you have an example which one could investigate?
-Tatu
Send from my mobile
Ugh
What you are trying to do with the listener, is not possible. Listeners can only listen the test execution status but, currently, listeners cannot modify the test execution status in any way. There has been multiple requests to change this design (there should be issue describing the planned change in the GitHub) but that has not been implemented.
To do, what your listener is trying to do, you need to write a keyword and call that keyword in every test case teardown.
-Tatu
Send from my mobile
Ugh
Listener only listens and one should not be able do have any interaction from listener to Robot Framework. If tagging happens to work, you have stumbled to an undocumented feature, somebody could considered it a bug. Will the feature remain and is there planned changes in this area in the future, I don't know. That is more a question to the RF development team.
-Tatu
Send from my mobile
Hi guys,
I have done similar custom logger for libraries that enabled us to log correctly from libraries no matter whether the Robot is installed or not, nor if the library is executed from Robot or not.
Now I have realized that there is no real need for this custom library as using the Python logging API in libraries the logging will be added also to the Robot log due to a Robothandler that is added to the logging system.
Now I want to create a configuration where libraries will add logging to the console and to a file when they are executed without Robot and when executed from Robot the logging would go to Robot log and to the file. Logging to the file is mainly there because of the inability to log from the threads to the Robot Log.
This all worked fine while I was initializing the loggers from code but once I started using json config files with “config.dictConfig” the logging to the Robot Log stopped working. This is because the ‘dictConfig’ will clear the RobotHandler from the root logger, even when 'disable_existing_loggers' is set to false.
Any ideas what would be the best way to fix this?
The problem is that I’m initializing my loggers in the top suite setup which is too late.
I should do it before Robot starts. Best way to do this? Are there any hooks for this kind of purpose?
or should I just try to save the root logger handlers before calling ‘dictConfig’ and then restore them afterwards?
Thanks,
Jyrki