-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathLogCollection.cs
42 lines (37 loc) · 995 Bytes
/
LogCollection.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using System.Configuration;
namespace Youzee.Util.Logger
{
/**
* Log configuration element collection
*
* @copyright (C) Youzee (2012)
* @author Keyvan Akbary <[email protected]>
* @version 1.0
*/
class LogCollection : ConfigurationElementCollection
{
private const string LOG_ELEMENT_NAME = "log";
protected override ConfigurationElement CreateNewElement()
{
return new LogElement();
}
protected override object GetElementKey(ConfigurationElement element)
{
return ((LogElement)element).Level;
}
public override ConfigurationElementCollectionType CollectionType
{
get
{
return ConfigurationElementCollectionType.BasicMap;
}
}
protected override string ElementName
{
get
{
return LOG_ELEMENT_NAME;
}
}
}
}