File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -179,7 +179,8 @@ impl AndroidLogger {
179179
180180static ANDROID_LOGGER : OnceLock < AndroidLogger > = OnceLock :: new ( ) ;
181181
182- const LOGGING_TAG_MAX_LEN : usize = 128 ;
182+ // Maximum length of a tag that does not require allocation.
183+ const LOGGING_TAG_MAX_LEN : usize = 127 ;
183184const LOGGING_MSG_MAX_LEN : usize = 4000 ;
184185
185186impl Default for AndroidLogger {
@@ -211,7 +212,7 @@ impl Log for AndroidLogger {
211212 return ;
212213 }
213214
214- // tag must not exceed LOGGING_TAG_MAX_LEN
215+ // tag longer than LOGGING_TAG_MAX_LEN causes allocation
215216 let mut tag_bytes: [ MaybeUninit < u8 > ; LOGGING_TAG_MAX_LEN + 1 ] = uninit_array ( ) ;
216217
217218 let module_path = record. module_path ( ) . unwrap_or_default ( ) . to_owned ( ) ;
You can’t perform that action at this time.
0 commit comments