Mercurial > projects > ldc
comparison tango/tango/util/log/model/IHierarchy.d @ 132:1700239cab2e trunk
[svn r136] MAJOR UNSTABLE UPDATE!!!
Initial commit after moving to Tango instead of Phobos.
Lots of bugfixes...
This build is not suitable for most things.
author | lindquist |
---|---|
date | Fri, 11 Jan 2008 17:57:40 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
131:5825d48b27d1 | 132:1700239cab2e |
---|---|
1 /******************************************************************************* | |
2 | |
3 copyright: Copyright (c) 2004 Kris Bell. All rights reserved | |
4 | |
5 license: BSD style: $(LICENSE) | |
6 | |
7 version: Initial release: May 2004 | |
8 | |
9 author: Kris | |
10 | |
11 *******************************************************************************/ | |
12 | |
13 module tango.util.log.model.IHierarchy; | |
14 | |
15 public import tango.util.log.model.ILevel; | |
16 | |
17 /******************************************************************************* | |
18 | |
19 The Logger hierarchy Interface. We use this to break the | |
20 interdependency between a couple of modules | |
21 | |
22 *******************************************************************************/ | |
23 | |
24 interface IHierarchy | |
25 { | |
26 /********************************************************************** | |
27 | |
28 Return the name of this Hierarchy | |
29 | |
30 **********************************************************************/ | |
31 | |
32 char[] getName (); | |
33 | |
34 /********************************************************************** | |
35 | |
36 Return the address of this Hierarchy. This is typically | |
37 attached when sending events to remote monitors. | |
38 | |
39 **********************************************************************/ | |
40 | |
41 char[] getAddress (); | |
42 | |
43 /*********************************************************************** | |
44 | |
45 Configure a context | |
46 | |
47 ***********************************************************************/ | |
48 | |
49 void context (Context context); | |
50 | |
51 /*********************************************************************** | |
52 | |
53 Return the configured context | |
54 | |
55 ***********************************************************************/ | |
56 | |
57 Context context (); | |
58 | |
59 /*********************************************************************** | |
60 | |
61 Context for a hierarchy, used for customizing behaviour | |
62 of log hierarchies. You can use this to implement dynamic | |
63 log-levels, based upon filtering or some other mechanism | |
64 | |
65 ***********************************************************************/ | |
66 | |
67 interface Context | |
68 { | |
69 /// return a label for this context | |
70 char[] label (); | |
71 | |
72 /// first arg is the setting of the logger itself, and | |
73 /// the second arg is what kind of message we're being | |
74 /// asked to produce | |
75 bool isEnabled (ILevel.Level setting, ILevel.Level target); | |
76 } | |
77 } |