@@ -1029,6 +1029,11 @@ logging_to_exchange_works(Config) ->
10291029 #{domain => ? RMQLOG_DOMAIN_UPGRADE }, Config1 ),
10301030 rabbit_ct_helpers :await_condition (ContainsLogEntry4 , 30_000 ),
10311031
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+
10321037 % % increase log level
10331038 ok = rabbit_ct_broker_helpers :rpc (
10341039 Config , 0 ,
@@ -1179,14 +1184,17 @@ ping_log(Id, Level, Metadata, Config) ->
11791184 32 ,
11801185 " abcdefghijklmnopqrstuvwxyz"
11811186 " 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 ]),
11831191 case need_rpc (Config ) of
1184- false -> logger :log (Level , RandomMsg , Metadata );
1192+ false -> logger :log (Level , Msg , Metadata );
11851193 true -> rabbit_ct_broker_helpers :rpc (
11861194 Config , 0 ,
1187- logger , log , [Level , RandomMsg , Metadata ])
1195+ logger , log , [Level , Msg , Metadata ])
11881196 end ,
1189- check_log (Id , Level , RandomMsg , Config ).
1197+ check_log (Id , Level , Msg , Config ).
11901198
11911199need_rpc (Config ) ->
11921200 rabbit_ct_helpers :get_config (
@@ -1216,7 +1224,7 @@ check_log1(#{id := Id,
12161224 end ,
12171225 fun () ->
12181226 {ok , Content } = file :read_file (Filename ),
1219- ReOpts = [{capture , none }, multiline ],
1227+ ReOpts = [{capture , none }, multiline , unicode ],
12201228 match =:= re :run (Content , RandomMsg ++ " $" , ReOpts )
12211229 end ;
12221230check_log1 (#{module := Mod ,
@@ -1227,7 +1235,7 @@ check_log1(#{module := Mod,
12271235 when ? IS_STD_H_COMPAT (Mod ) andalso ? IS_STDDEV (Stddev ) ->
12281236 Filename = html_report_filename (Config ),
12291237 {ColorStart , ColorEnd } = get_color_config (Handler , Level ),
1230- ReOpts = [{capture , none }, multiline ],
1238+ ReOpts = [{capture , none }, multiline , unicode ],
12311239 fun () ->
12321240 {ok , Content } = file :read_file (Filename ),
12331241 Regex =
@@ -1239,7 +1247,7 @@ check_log1(#{module := rabbit_logger_exchange_h},
12391247 RandomMsg ,
12401248 Config ) ->
12411249 {Chan , QName } = ? config (test_channel_and_queue , Config ),
1242- ReOpts = [{capture , none }, multiline ],
1250+ ReOpts = [{capture , none }, multiline , unicode ],
12431251 fun () ->
12441252 Ret = amqp_channel :call (
12451253 Chan , # 'basic.get' {queue = QName , no_ack = false }),
@@ -1257,7 +1265,7 @@ check_log1(#{module := syslog_logger_h},
12571265 _Level ,
12581266 RandomMsg ,
12591267 Config ) ->
1260- ReOpts = [{capture , none }, multiline ],
1268+ ReOpts = [{capture , none }, multiline , unicode ],
12611269 fun () ->
12621270 Buffer = get_syslogd_messages (Config ),
12631271 match =:= re :run (Buffer , RandomMsg ++ " $" , ReOpts )
0 commit comments