-
Notifications
You must be signed in to change notification settings - Fork 2
/
Log.cls.xml
60 lines (54 loc) · 1.35 KB
/
Log.cls.xml
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?xml version="1.0" encoding="UTF-8"?>
<Export generator="Cache" version="25">
<Class name="EventsQueue.Log">
<Description>
Log class for queue manager</Description>
<Super>%Persistent</Super>
<TimeCreated>63999,45523.243658</TimeCreated>
<Property name="TS">
<Description>
Event timestamp</Description>
<Type>%TimeStamp</Type>
<InitialExpression>$ZDT($NOW(),3,1,3)</InitialExpression>
</Property>
<Property name="Pid">
<Description>
Agent's Process ID</Description>
<Type>%String</Type>
</Property>
<Property name="LogLevel">
<Description>
Log level</Description>
<Type>%String</Type>
<InitialExpression>2</InitialExpression>
<Parameter name="DISPLAYLIST" value=",Debug,Info,Warn,Error"/>
<Parameter name="VALUELIST" value=",1,2,4,8"/>
</Property>
<Property name="Message">
<Description>
Event message</Description>
<Type>%String</Type>
<Parameter name="MAXLEN"/>
</Property>
<Method name="Add">
<Description>
Add a record to log with level = pLevel and message = pMsg</Description>
<ClassMethod>1</ClassMethod>
<FormalSpec>pLevel:%String,pMsg:%String</FormalSpec>
<ReturnType>%Status</ReturnType>
<Implementation><![CDATA[
set st = $$$OK
try {
set line = ..%New()
set line.LogLevel = pLevel
set line.Pid = $j
set line.Message = pMsg
$$$TOE(st, line.%Save(0))
} catch ex {
set st = ex.AsStatus()
}
quit st
]]></Implementation>
</Method>
</Class>
</Export>