Skip to content

Commit

Permalink
#5 added basic logging with serilog
Browse files Browse the repository at this point in the history
  • Loading branch information
sipakov committed Apr 2, 2023
1 parent bba3f86 commit 659e5e8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ public override async Task<IEnumerable<User>> All()

public override async Task<User> Upsert(User entity)
{
_logger.LogInformation("started");
try
{
User? existingUser;
Expand Down
5 changes: 3 additions & 2 deletions AlgoTecture.TelegramBot/Controllers/MainController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ public MainController(ITelegramUserInfoService telegramUserInfoService, IBoatCon
[Action("/start", "start the bot")]
public async Task Start()
{
_logger.LogInformation("asdasd");
var chatId = Context.GetSafeChatId();
var userId = Context.GetSafeUserId();
var userName = Context.GetUsername();
Expand All @@ -42,7 +41,9 @@ public async Task Start()
TelegramUserFullName = fullUserName
};

_ = await _telegramUserInfoService.AddOrUpdate(addTelegramUserInfoModel);
var user = await _telegramUserInfoService.AddOrUpdate(addTelegramUserInfoModel);

_logger.LogInformation($"User {user.TelegramUserFullName} log in by telegram bot");

PushL("I am your assistant 💁‍♀️ in searching and renting sustainable spaces around the globe 🌍 (test mode)");

Expand Down

0 comments on commit 659e5e8

Please sign in to comment.