Presentation at JCrete.org

forax at univ-mlv.fr forax at univ-mlv.fr
Mon Jul 24 15:08:55 UTC 2023


> From: "Brian Goetz" <brian.goetz at oracle.com>
> To: "Robbe Pincket" <robbepincket at live.be>, "David Alayachew"
> <davidalayachew at gmail.com>, "Remi Forax" <forax at univ-mlv.fr>
> Cc: "amber-dev" <amber-dev at openjdk.org>
> Sent: Monday, July 24, 2023 3:38:43 PM
> Subject: Re: Presentation at JCrete.org

> On 7/24/2023 8:26 AM, [ mailto:forax at univ-mlv.fr | forax at univ-mlv.fr ] wrote:

>> The problem of logger.info(LOG.”value: \{value}”) is that the logger receive a
>> string, not a string template

> No, not necessarily. LOG can be a (purely functional) TemplateProcessor<LogMsg>,
> which defers rendering the string until it is actually logged:

> logger.info(LogMsg msg)

> Then you have a free choice over where to put the validation (in LOG, or in the
> logger.)
If the validation is in LOG, it means you can bypass the validation. 
And If the validation is in logger, then LogMsg really looks like the same abstraction as StringTemplate. 

hence 
logger.info(). ”value: \{value}”; 

Rémi 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-dev/attachments/20230724/9cf87150/attachment.htm>


More information about the amber-dev mailing list