<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Aptos;
        panose-1:2 11 0 4 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Aptos",sans-serif;
        mso-ligatures:standardcontextual;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#467886;
        text-decoration:underline;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:11.0pt;
        mso-ligatures:none;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="en-SE" link="#467886" vlink="#96607D" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="ES">Hi all,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="ES"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">During the migration of compiler logs to the UnifiedLogging framework, I have observed that multiline logging does not include decorators for all the lines, instead only adding them for the first one and leaving the rest
 “dangling”. I have found out that this is already a reported issue in <a href="https://bugs.openjdk.org/browse/JDK-8288298">
JDK-8288298</a>, and written a tentative fix for it.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Some initial testing has been yielding insignificant performance changes with normal logging use cases, but before going forward with it I would like to request for comments and opinions on this. As far as I know, it
 would simplify somewhat “manual reading” of logs, as everything starts right now in the same column, as well as automated parsing as there would be no line ambiguities. Copying from the JBS description:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">> log_info(gc)("A\nB"); currently outputs:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">> [0s][gc] A<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">> B<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">> And after this change will output:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">> [0s][gc] A<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">> [1s][gc] B<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">> This change allows UL to be parsed by regex. Example for per-line parsing:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">> ^\[ [^\[\]]* \] \[ [^\[\]]* \] (\[ [^\[\]]* \])?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">It is worth mentioning that the special case with -Xlog:foldmultilines=true is not affected by this (i.e., if foldmultilines is set to true we do not carry out the line-by-line decorating).<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Antón<o:p></o:p></span></p>
</div>
</body>
</html>