From e30a98acbc93d73700017b8c52d3c0df7477957c Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Tue, 4 Apr 2023 15:24:58 -0700 Subject: [PATCH] [Impeller] Clarify validation log behavior. (flutter/engine#40921) [Impeller] Clarify validation log behavior. --- engine/src/flutter/impeller/base/validation.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/engine/src/flutter/impeller/base/validation.h b/engine/src/flutter/impeller/base/validation.h index e3e93ddd0b..60ed89df71 100644 --- a/engine/src/flutter/impeller/base/validation.h +++ b/engine/src/flutter/impeller/base/validation.h @@ -38,4 +38,17 @@ struct ScopedValidationDisable { } // namespace impeller +//------------------------------------------------------------------------------ +/// Get a stream to the log Impeller uses for all validation errors. The +/// behavior of these logs is as follows: +/// +/// * Validation error are completely ignored in the Flutter release +/// runtime-mode. +/// * In non-release runtime-modes, validation logs are redirected to the +/// Flutter `INFO` log. These logs typically show up when verbose logging is +/// enabled. +/// * If `ImpellerValidationErrorsSetFatal` is set to `true`, validation logs +/// are fatal. The runtime-mode restriction still applies. This usually +/// happens in test environments. +/// #define VALIDATION_LOG ::impeller::ValidationLog{}.GetStream()