Project

General

Profile

Actions

Feature #2893

open

Avoid using the wt_config.xml to configure logging with WTestEnvironment

Added by Marco M about 10 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
03/31/2014
Due date:
% Done:

0%

Estimated time:

Description

[Made a feature request as suggested by Koen, from http://redmine.emweb.be/boards/2/topics/8790\]

Using the WTestEnvironment, one would like to completely silence the default Wt logger during the test runs.

A normal initialization sequence is:

_env = new Wt::Test::WTestEnvironment();

Wt::WLogger& logger = _env~~server()~~>logger();

logger.configure("* -info -debug");

The above sequence has a too late effect, since there is log output already during the WTestEnvironment constructor:

[2014-Mar-30 22:58:05.103593] 2496 - [info] "config: reading Wt config file: /etc/wt_config.xml (location = '')"

[2014-Mar-30 22:58:05.109003] 2496 - [info] "Wt: session created (#sessions = 1)"

So with the current code the only way is to use a custom wt_config.xml and pass it to WTestEnvironment.

It would be nice to be able to completely silent the logger without the need to use a configuration file.

No data to display

Actions

Also available in: Atom PDF