Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IMessageFormatter param is not nullable #36

Open
onatsko opened this issue Oct 28, 2024 · 1 comment
Open

IMessageFormatter param is not nullable #36

onatsko opened this issue Oct 28, 2024 · 1 comment

Comments

@onatsko
Copy link

onatsko commented Oct 28, 2024

I use your lib for sending message to Telegram, it works great, thank you!

But today I enable nullable in project
and get error on code:

   logConfig = logConfig.WriteTo.Telegram(config => { ....  }, null, logLevelError);

null is param IMessageFormatter messageFormatter

in ctor I see that it is not nullable

    public static LoggerConfiguration Telegram(
      this LoggerSinkConfiguration loggerConfiguration,
      Action<TelegramSinkConfiguration> configureAction,
      IMessageFormatter messageFormatter,
      LogEventLevel restrictedToMinimumLevel = LogEventLevel.Verbose)

but in next ctor TelegramSink is nullable

    public TelegramSink(
      ChannelWriter<LogEvent> channelWriter,
      ILogsQueueAccessor logsQueueAccessor,
      TelegramSinkConfiguration sinkConfiguration,
      IMessageFormatter? messageFormatter)

pls make IMessageFormatter nullable in LoggerConfiguration Telegram

@Bardin08
Copy link
Owner

Fixed #38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants