summaryrefslogtreecommitdiff
path: root/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/LogMessages.properties
blob: 7159c6b02cbee2ccf4990d6ed3e3f69607b995bc (plain)
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
#
#  Licensed to the Apache Software Foundation (ASF) under one
#  or more contributor license agreements.  See the NOTICE file
#  distributed with this work for additional information
#  regarding copyright ownership.  The ASF licenses this file
#  to you under the Apache License, Version 2.0 (the
#  "License"); you may not use this file except in compliance
#  with the License.  You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
#  Unless required by applicable law or agreed to in writing,
#  software distributed under the License is distributed on an
#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
#  KIND, either express or implied.  See the License for the
#  specific language governing permissions and limitations
#  under the License.
#
# Default File used for all non-defined locales.
#
# LogMessages used within the Java Broker as originally defined on the wiki:
# http://cwiki.apache.org/confluence/display/qpid/Status+Update+Design#StatusUpdateDesign-InitialStatusMessages
# 	 
# Technical Notes: 	 
#  This is a standard Java Properties file so white space is respected at the 	 
#  end of the lines. This file is processed in a number of ways. 	 
# 1) ResourceBundle 	 
#   This file is loaded through a ResourceBundle named LogMessages. the en_US 	 
#   addition to the file is the localisation. Additional localisations can be 	 
#   provided and will automatically be selected based on the <locale> value in 	 
#   the config.xml. The default is en_US. 	 
# 	 
# 2) MessasgeFormat 	 
#  Each entry is prepared with the Java Core MessageFormat methods. Therefore 	 
#  most functionality you can do via MessageFormat can be done here: 	 
# 	 
#  http://java.sun.com/javase/6/docs/api/java/text/MessageFormat.html 	 
# 	 
#  The cavet here is that only default String and number FormatTypes can be used. 	 
#  This is due to the processing described in 3 below. If support for date, time 	 
#  or choice is requried then the GenerateLogMessages class should be updated to 	 
#  provide support. 	 
# 	 
#  Format Note: 	 
#   As mentioned earlier white space in this file is very important. One thing 	 
#  in particular to note is the way MessageFormat peforms its replacements. 	 
#  The replacement text will totally replace the {xxx} section so there will be 	 
#  no addtion of white space or removal e.g. 	 
#     MSG = Text----{0}---- 	 
#  When given parameter 'Hello' result in text: 	 
#     Text----Hello---- 	 
# 	 
#  For simple arguments this is expected however when using Style formats then 	 
#  it can be a little unexepcted. In particular a common pattern is used for 	 
#  number replacements : {0,number,#}. This is used in the Broker to display an 	 
#  Integer simply as the Integer with no formating. e.g new Integer(1234567) 	 
#  becomes the String "1234567" which is can be contrasted with the pattern 	 
#  without a style format field : {0,number} which becomes string "1,234,567". 	 
# 	 
#  What you may not expect is that {0,number, #} would produce the String " 1234567" 	 
#  note the space after the ','   here      /\   has resulted in a space  /\ in 	 
#  the output. 	 
# 	 
#  More details on the SubformatPattern can be found on the API link above. 	 
# 	 
# 3) GenerateLogMessage/Velocity Macro 	 
#  This is the first and final stage of processing that this file goes through. 	 
#   1) Class Generation: 	 
#      The GenerateLogMessage processes this file and uses the velocity Macro 	 
#      to create classes with static methods to perform the logging and give us 	 
#      compile time validation. 	 
# 	 
#   2) Property Processing: 	 
#      During the class generation the message properties ({x}) are identified 	 
#      and used to create the method signature. 	 
# 	 
#   3) Option Processing: 	 
#      The Classes perform final formatting of the messages at runtime based on 	 
#      optional parameters that are defined within the message. Optional 	 
#      paramters are enclosed in square brackets e.g. [optional]. 	 
# 	 
#  To provide fixed log messages as required by the Technical Specification: 	 
#  http://cwiki.apache.org/confluence/display/qpid/Operational+Logging+-+Status+Update+-+Technical+Specification#OperationalLogging-StatusUpdate-TechnicalSpecification-Howtoprovidefixedlogmessages 	 
# 	 
#  This file is processed by Velocity to create a number of classes that contain 	 
#  static methods that provide LogMessages in the code to provide compile time 	 
#  validation. 	 
# 	 
#  For details of what processing is done see GenerateLogMessages. 	 
# 	 
#  What a localiser or developer need know is the following: 	 
# 	 
#  The Property structure is important is it defines how the class and methods 	 
#  will be built. 	 
# 	 
#  Class Generation: 	 
#  ================= 	 
# 	 
#  Each class of messages will be split in to their own <Class>Messages.java 	 
#  Currently the following classes are created and are populated with the 	 
#  messages that bear their 3-digit type identifier: 	 
# 	 
#        Class              | Type 	 
#      ---------------------|-------- 	 
#        Broker             |  BKR 	 
#        ManagementConsole  |  MNG 	 
#        VirtualHost        |  VHT 	 
#        MessageStore       |  MST
#        ConfigStore        |  CFG
#        TransactionLog     |  TXN
#        Connection         |  CON 	 
#        Channel            |  CHN 	 
#        Queue              |  QUE 	 
#        Exchange           |  EXH 	 
#        Binding            |  BND 	 
#        Subscription       |  SUB 	 
#
#  Property Format
#  ===============
#   The property format MUST adhere to the follow format to make it easier to
#   use the logging API as a developer but also so that operations staff can
#   easily locate log messages in the output.
#
#   The property file should contain entries in the following format
#
#   <Log Identifier, developer focused> = <Log Identifier, Operate focus> : <Log Message>
#
#   eg:
#    BRK_SHUTTING_DOWN = BRK-1003 : Shuting down : {0} port {1,number,#}
#
#   Note: the developer focused identifier will become a method name so only a
#   valid method name should be used. Currently only '-' are converted to '_'.
#
#   That said properties generate the logging code at build time so any error
#   can be easily identified.
#
#  Property Processing: 	 
#  ==================== 	 
# 	 
#   Each property is then processed by the GenerateLogMessages class to identify 	 
#   The number and type of parameters, {x} entries. Parameters are defaulted to 	 
#   String types but the use of FormatType number (e.g.{0,number}) will result 	 
#   in a Number type being used. These parameters are then used to build the 	 
#   method parameter list. e.g: 	 
#   Property: 	 
#    BRK_SHUTTING_DOWN = BRK-1003 : Shuting down : {0} port {1,number,#} 	 
#   becomes Method: 	 
#    public static LogMessage BRK_SHUTTING_DOWN(String param1, Number param2)
# 	 
#   This improves our compile time validation of log message content and 	 
#   ensures that change in the message format does not accidentally cause 	 
#   erroneous messages. 	 
# 	 
#  Option Processing: 	 
#  ==================== 	 
# 	 
#  Options are identified in the log message as being surrounded by square 	 
#  brackets ([ ]). These optional values can themselves contain paramters 	 
#  however nesting of options is not permitted. Identification is performed on 	 
#  first matchings so give the message: 	 
#   Msg = Log Message [option1] [option2] 	 
#  Two options will be identifed and enabled to select text 'option1 and 	 
#  'option2'. 	 
# 	 
#  The nesting of a options is not supported and will provide 	 
#  unexpected results. e.g. Using Message: 	 
#   Msg = Log Message [option1 [sub-option2]] 	 
# 	 
#  The options will be 'option1 [sub-option2' and 'sub-option2'. The first 	 
#  option includes the second option as the nesting is not detected. 	 
# 	 
#  The detected options are presented in the method signature as boolean options 	 
#  numerically identified by their position in the message. e.g. 	 
#   Property: 	 
#    CON-1001 = Open : Client ID {0} [: Protocol Version : {1}] 	 
#  becomes Method: 	 
#    public static LogMessage CON_1001(String param1, String param2, boolean opt1) 	 
# 	 
#  The value of 'opt1' will show/hide the option in the message. Note that 	 
#  'param2' is still required however a null value can be used if the optional 	 
#  section is not desired. 	 
# 	 
#  Again here the importance of white space needs to be highlighted. 	 
#  Looking at the QUE-1001 message as an example. The first thought on how this 	 
#  would look would be as follows: 	 
# QUE-1001 = Create : Owner: {0} [AutoDelete] [Durable] [Transient] [Priority: {1,number,#}] 	 
#  Each option is correctly defined so the text that is defined will appear when 	 
#  selected. e.g. 'AutoDelete'. However, what may not be immediately apparent is 	 
#  the white space. Using the above definition of QUE-1001 if we were to print 	 
#  the message with only the Priority option displayed it would appear as this: 	 
#  "Create : Owner: guest    Priority: 1" 	 
#  Note the spaces here   /\ This is because only the text between the brackets 	 
#  has been removed. 	 
# 	 
#  Each option needs to include white space to correctly format the message. So 	 
#  the correct definition of QUE-1001 is as follows: 	 
# QUE-1001 = Create : Owner: {0}[ AutoDelete][ Durable][ Transient][ Priority: {1,number,#}] 	 
#  Note that white space is included with each option and there is no extra 	 
#  white space between the options. As a result the output with just Priority 	 
#  enabled is as follows: 	 
#  "Create : Owner: guest Priority: 1" 	 
# 	 
#  The final processing that is done in the generation is the conversion of the 	 
#  property name. As a '-' is an illegal character in the method name it is 	 
#  converted to '_' This processing gives the final method signature as follows: 	 
#   <Class>Message.<Type>_<Number>(<parmaters>,<options>) 	 
#
#
# Default File used for all non-defined locales.
#Broker
# 0 - Version
# 1 = Build
BRK_STARTUP = BRK-1001 : Startup : Version: {0} Build: {1}
# 0 - Transport
# 1 - Port
BRK_LISTENING = BRK-1002 : Starting : Listening on {0} port {1,number,#}
# 0 - Transport
# 1 - Port
BRK_SHUTTING_DOWN = BRK-1003 : Shuting down : {0} port {1,number,#}
BRK_READY = BRK-1004 : Ready
BRK_STOPPED = BRK-1005 : Stopped
# 0 - path
BRK_CONFIG = BRK-1006 : Using configuration : {0}
# 0 - path
BRK_LOG_CONFIG = BRK-1007 : Using logging configuration : {0}

#ManagementConsole
MNG_STARTUP = MNG-1001 : Startup
# 0 - Service
# 1 - Port
MNG_LISTENING = MNG-1002 : Starting : {0} : Listening on port {1,number,#}
# 0 - Service
# 1 - Port
MNG_SHUTTING_DOWN = MNG-1003 : Shuting down : {0} : port {1,number,#}
MNG_READY = MNG-1004 : Ready
MNG_STOPPED = MNG-1005 : Stopped
# 0 - Path
MNG_SSL_KEYSTORE = MNG-1006 : Using SSL Keystore : {0}
MNG_OPEN = MNG-1007 : Open : User {0}
MNG_CLOSE = MNG-1008 : Close


#VirtualHost
# 0 - name
VHT_CREATED = VHT-1001 : Created : {0}
VHT_CLOSED = VHT-1002 : Closed

#MessageStore
# 0 - name
MST_CREATED = MST-1001 : Created : {0}
# 0 - path
MST_STORE_LOCATION = MST-1002 : Store location : {0}
MST_CLOSED = MST-1003 : Closed
MST_RECOVERY_START = MST-1004 : Recovery Start
MST_RECOVERED = MST-1005 : Recovered {0,number} messages
MST_RECOVERY_COMPLETE = MST-1006 : Recovery Complete

#ConfigStore
# 0 - name
CFG-1001 = CFG-1001 : Created : {0}
# 0 - path
CFG-1002 = CFG-1002 : Store location : {0}
CFG-1003 = CFG-1003 : Closed
CFG-1004 = CFG-1004 : Recovery Start
CFG-1005 = CFG-1005 : Recovery Complete

#TransactionLog
# 0 - name
TXN-1001 = TXN-1001 : Created : {0}
# 0 - path
TXN-1002 = TXN-1002 : Store location : {0}
TXN-1003 = TXN-1003 : Closed
# 0 - queue name
TXN-1004 = TXN-1004 : Recovery Start[ : {0}]
# 0 - count
# 1 - queue count
TXN-1005 = TXN-1005 : Recovered {0,number} messages for queue {1}
# 0 - queue name
TXN-1006 = TXN-1006 : Recovery Complete[ : {0}]

#Connection
# 0 - Client id
# 1 - Protocol Version
CON_OPEN = CON-1001 : Open[ : Client ID : {0}][ : Protocol Version : {1}]
CON_CLOSE = CON-1002 : Close

#Channel
CHN_CREATE = CHN-1001 : Create
# 0 - flow
CHN_FLOW = CHN-1002 : Flow {0}
CHN_CLOSE = CHN-1003 : Close
# 0 - bytes allowed in prefetch
# 1 - number of messagse.
CHN_PREFETCH_SIZE = CHN-1004 : Prefetch Size (bytes) {0,number} : Count {1,number}
# 0 - queue causing flow control
CHN_FLOW_ENFORCED = CHN-1005 : Flow Control Enforced (Queue {0})
CHN_FLOW_REMOVED = CHN-1006 : Flow Control Removed

#Queue
# 0 - owner
# 1 - priority
QUE_CREATED = QUE-1001 : Create :[ Owner: {0}][ AutoDelete][ Durable][ Transient][ Priority: {1,number,#}]
QUE_DELETED = QUE-1002 : Deleted
QUE_OVERFULL = QUE-1003 : Overfull : Size : {0,number} bytes, Capacity : {1,number}
QUE_UNDERFULL = QUE-1004 : Underfull : Size : {0,number} bytes, Resume Capacity : {1,number}


#Exchange
# 0 - type
# 1 - name
EXH_CREATED = EXH-1001 : Create :[ Durable] Type: {0} Name: {1}
EXH_DELETED = EXH-1002 : Deleted

#Binding
BND_CREATED = BND-1001 : Create[ : Arguments : {0}]
BND_DELETED = BND-1002 : Deleted

#Subscription
SUB_CREATE = SUB-1001 : Create[ : Durable][ : Arguments : {0}]
SUB_CLOSE = SUB-1002 : Close
# 0 - The current subscription state
SUB_STATE = SUB-1003 : State : {0}