List Icon
Mailing list Archive

2019 up to July 2022 | 20182017  |  2016  2015 2014 | 2013

The mailing list has been closed since July 2022, but continues to serve as an archive of information about QF-Test.
But if you want to stay informed about news about QF-Test, you can simply
Subscribe to Newsletter  

To get up-to-date information about each release - including minor releases - you can
subscribe to the RSS feed or follow us on social media.
Alternatively, QF-Test also provides release information itself.

Another source of information is our blog, where there are current articles on general topics, on the company QFS and also various "how-tos"
subscribe to blog

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [QF-Test] Logging in Terminal with Jython

  • Subject: Re: [QF-Test] Logging in Terminal with Jython
  • From: BENHAROUS Cedric <cedric.benharous@?.com>
  • Date: Tue, 14 Nov 2017 19:22:48 +0100
  • Delivered-to: qftest-list@?.net

Hi Yann,

Yes, it is working fine like this !
Thank you.



-----Message d'origine-----
De : Yann Spoeri, QFS [mailto:yann.spoeri@?.de] 
Envoyé : mardi 14 novembre 2017 12:25
À : qftest-list@?.de
Objet : Re: [QF-Test] Logging in Terminal with Jython

Hi all,

In a SUT script your script will log the messages into the QF-Test Terminal because all the stdout of the SUT gets redirected into the QF-Test terminal. In a Server Script you are executing the script in QF-Test itself. However the stdout of QF-Test itself is *not* necessarily redirected into the QF-Test terminal. (But you can still access the logging outputs - e.g. on Windows simply use qftestc.exe on the commandline.)

You can also use a script with something like this:

import logging

class Stream():
     def write(self, msg):
         print msg,

logger = logging.getLogger('someModule')
logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.DEBUG)"info")

Hope this helps.


Am 09.11.2017 um 18:02 schrieb BENHAROUS Cedric:
> Hi all,
> We have an issue concerning the use of the logging package inside a Jython server script.
> It does not print any values in QF-Test 4.1.3 in Terminal (unlike the use of print).
> Is there some specific configuration to apply ?
> Code example:
> import logging, sys
> logger = logging.getLogger('someModule')
> logger.addHandler(logging.StreamHandler(sys.stdout))
> logging.basicConfig(format='%(levelname)s:%(message)s', 
> level=logging.DEBUG)
> logger.warn("warn")
> Cheers,
> Cédric
> _______________________________________________
> qftest-list mailing list
> qftest-list@?.de

Yann Felix Spöri

E: yann.spoeri@?.de
T: +49 8171 38648-21
F: +49 8171 38648-16

Quality First Software GmbH | Tulpenstr. 41 | 82538 Geretsried | Germany GF Gregor Schmid, Dr. Martina Schmid, Karlheinz Kellerer HRB München 140833