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 {
179
179
180
180
static ANDROID_LOGGER : OnceLock < AndroidLogger > = OnceLock :: new ( ) ;
181
181
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 ;
183
184
const LOGGING_MSG_MAX_LEN : usize = 4000 ;
184
185
185
186
impl Default for AndroidLogger {
@@ -211,7 +212,7 @@ impl Log for AndroidLogger {
211
212
return ;
212
213
}
213
214
214
- // tag must not exceed LOGGING_TAG_MAX_LEN
215
+ // tag longer than LOGGING_TAG_MAX_LEN causes allocation
215
216
let mut tag_bytes: [ MaybeUninit < u8 > ; LOGGING_TAG_MAX_LEN + 1 ] = uninit_array ( ) ;
216
217
217
218
let module_path = record. module_path ( ) . unwrap_or_default ( ) . to_owned ( ) ;
You can’t perform that action at this time.
0 commit comments