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 #37

Open
onatsko opened this issue Oct 27, 2024 · 1 comment · May be fixed by #38
Open

IMessageFormatter param is not nullable #37

onatsko opened this issue Oct 27, 2024 · 1 comment · May be fixed by #38
Assignees
Labels
bug Something isn't working

Comments

@onatsko
Copy link
Collaborator

onatsko commented Oct 27, 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

@a-gubskiy a-gubskiy self-assigned this Oct 27, 2024
@a-gubskiy a-gubskiy linked a pull request Oct 27, 2024 that will close this issue
@a-gubskiy a-gubskiy added the bug Something isn't working label Oct 27, 2024
@a-gubskiy
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

2 participants