Presentation at JCrete.org
Brian Goetz
brian.goetz at oracle.com
Mon Jul 24 15:14:16 UTC 2023
> 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.
No it doesn't; you can control (e.g. via sealing) the creation of
LogMsg. Of course, you can write an API that lets people bypass
validation, but I'm assuming we're not doing deliberately silly things.
> And If the validation is in logger, then LogMsg really looks like the
> same abstraction as StringTemplate.
It depends what you actually want to do. LogMsg could incorporate
localization, automatic timestamping, etc. But yes, if all you want is
deferral, then
log.info(RAW."...")
will get you deferral without writing a processor.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-dev/attachments/20230724/df6606f1/attachment-0001.htm>
More information about the amber-dev
mailing list