<PackageReference Include="Serilog" Version="4.4.0" />

Serilog.Rendering.Padding

static class Padding
public static void Apply(TextWriter output, string value, ref Nullable alignment)

Writes the provided value to the output, applying direction-based padding when alignment is provided.

public static void Apply(TextWriter output, StringBuilder value, ref Nullable alignment)

Writes the provided value to the output, applying direction-based padding when alignment is provided. This is a full copy of the method above that allows to write StringBuilder directly into provided output without ToString call on the caller side.