@@ -1029,6 +1029,11 @@ logging_to_exchange_works(Config) ->
1029
1029
#{domain => ? RMQLOG_DOMAIN_UPGRADE }, Config1 ),
1030
1030
rabbit_ct_helpers :await_condition (ContainsLogEntry4 , 30_000 ),
1031
1031
1032
+ ContainsLogEntryUnicode =
1033
+ ping_log (rmq_1_exchange , info , " unicode 257 is ā" ,
1034
+ #{domain => ? RMQLOG_DOMAIN_UPGRADE }, Config1 ),
1035
+ rabbit_ct_helpers :await_condition (ContainsLogEntryUnicode , 30_000 ),
1036
+
1032
1037
% % increase log level
1033
1038
ok = rabbit_ct_broker_helpers :rpc (
1034
1039
Config , 0 ,
@@ -1179,14 +1184,17 @@ ping_log(Id, Level, Metadata, Config) ->
1179
1184
32 ,
1180
1185
" abcdefghijklmnopqrstuvwxyz"
1181
1186
" ABCDEFGHIJKLMNOPQRSTUVWXYZ" ),
1182
- ct :log (" Logging \" ~ts \" at level ~ts (~tp )" , [RandomMsg , Level , Metadata ]),
1187
+ ping_log (Id , Level , RandomMsg , Metadata , Config ).
1188
+
1189
+ ping_log (Id , Level , Msg , Metadata , Config ) ->
1190
+ ct :log (" Logging \" ~ts \" at level ~ts (~tp )" , [Msg , Level , Metadata ]),
1183
1191
case need_rpc (Config ) of
1184
- false -> logger :log (Level , RandomMsg , Metadata );
1192
+ false -> logger :log (Level , Msg , Metadata );
1185
1193
true -> rabbit_ct_broker_helpers :rpc (
1186
1194
Config , 0 ,
1187
- logger , log , [Level , RandomMsg , Metadata ])
1195
+ logger , log , [Level , Msg , Metadata ])
1188
1196
end ,
1189
- check_log (Id , Level , RandomMsg , Config ).
1197
+ check_log (Id , Level , Msg , Config ).
1190
1198
1191
1199
need_rpc (Config ) ->
1192
1200
rabbit_ct_helpers :get_config (
@@ -1216,7 +1224,7 @@ check_log1(#{id := Id,
1216
1224
end ,
1217
1225
fun () ->
1218
1226
{ok , Content } = file :read_file (Filename ),
1219
- ReOpts = [{capture , none }, multiline ],
1227
+ ReOpts = [{capture , none }, multiline , unicode ],
1220
1228
match =:= re :run (Content , RandomMsg ++ " $" , ReOpts )
1221
1229
end ;
1222
1230
check_log1 (#{module := Mod ,
@@ -1227,7 +1235,7 @@ check_log1(#{module := Mod,
1227
1235
when ? IS_STD_H_COMPAT (Mod ) andalso ? IS_STDDEV (Stddev ) ->
1228
1236
Filename = html_report_filename (Config ),
1229
1237
{ColorStart , ColorEnd } = get_color_config (Handler , Level ),
1230
- ReOpts = [{capture , none }, multiline ],
1238
+ ReOpts = [{capture , none }, multiline , unicode ],
1231
1239
fun () ->
1232
1240
{ok , Content } = file :read_file (Filename ),
1233
1241
Regex =
@@ -1239,7 +1247,7 @@ check_log1(#{module := rabbit_logger_exchange_h},
1239
1247
RandomMsg ,
1240
1248
Config ) ->
1241
1249
{Chan , QName } = ? config (test_channel_and_queue , Config ),
1242
- ReOpts = [{capture , none }, multiline ],
1250
+ ReOpts = [{capture , none }, multiline , unicode ],
1243
1251
fun () ->
1244
1252
Ret = amqp_channel :call (
1245
1253
Chan , # 'basic.get' {queue = QName , no_ack = false }),
@@ -1257,7 +1265,7 @@ check_log1(#{module := syslog_logger_h},
1257
1265
_Level ,
1258
1266
RandomMsg ,
1259
1267
Config ) ->
1260
- ReOpts = [{capture , none }, multiline ],
1268
+ ReOpts = [{capture , none }, multiline , unicode ],
1261
1269
fun () ->
1262
1270
Buffer = get_syslogd_messages (Config ),
1263
1271
match =:= re :run (Buffer , RandomMsg ++ " $" , ReOpts )
0 commit comments