Project

General

Profile

Support #3954

WLogger Scope

Added by Matt Russell over 7 years ago. Updated over 7 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
04/06/2015
Due date:
% Done:

0%

Estimated time:

Description

In the [[http://www.webtoolkit.eu/wt/doc/reference/html/classWt_1_1WLogger.html#a567c5b28fee703e37523898d30016f40 the WLogger docs]] it describes setting the logger for different scopes. It uses ``wthttp`` for example.

I was wondering how I might define my own scopes? Or get a list of existing ones? Say for example I want all log entries related to the DB to go through a different scope that the default.

#1

Updated by Wim Dumon over 7 years ago

Hello Matt,

From the top of my head, the scope is just a string, so you can simply invent your own scopes. I don't know of a method that lists the scopes in use.

Best regards,

Wim.

#2

Updated by Matt Russell over 7 years ago

Wim Dumon wrote:

From the top of my head, the scope is just a string, so you can simply invent your own scopes. I don't know of a method that lists the scopes in use.

Sounds good, but how do I log to one of these? Is there any Wt::log("level", "scope") << msg

?

Also available in: Atom PDF