private String asStringTruncatedTo254 ( Object o ) { String s = null ; if ( o != null ) { s = o . toString ( ) ; } if ( s != null && s . length ( ) > 254 ) { s = s . substring ( 0 , 254 ) ; } return s == null ? "" : s ; }
Gets the first 254 characters of an object s string representation . This is used to truncate a logging event s argument binding if necessary .