Open i3bepb opened 1 year ago
Maybe you can cut $formatted message in the template if you need?
Maybe you can cut $formatted message in the template if you need?
Yes
Is it planned to do something like this?
I decided to make a package https://github.com/i3bepb/laravel-crop-str-blade-directive with a directive for Blade that cuts the variable to the right size. With it, you can do this:
<b>{{ $appName }}</b> ({{ $level_name }})
Env: {{ $appEnv }}
<pre>[{{ $datetime->format('Y-m-d H:i:s') }}] {{ $appEnv }}.{{ $level_name }} @crop($formatted, 3846) }}</pre>
For others parts message I reserve 250 (4096 - 250 = 3846)
If error message length over 4096 and i change template:
Message break and I get two messages:
and:
When send messages to telegram as a response we get 400 error:
If not use wrap tag everything is fine.
Addition
I want 1 error = 1 message even if the size is over 4096. Example cut off and add ...