Skip to content

Commit b5c9b82

Browse files
committed
- Added more logs
1 parent 8b3dd95 commit b5c9b82

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

NotPixelBt/Bot.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,13 +224,16 @@ private void SetSessionMode()
224224

225225
switch (mode)
226226
{
227-
case "1":
227+
case "1":
228+
Logger.LogInfo("Выбран режим новой сессии");
228229
SessionMode = SessionMode.NewSession; break;
229230

230-
case "2":
231+
case "2":
232+
Logger.LogInfo("Выбран режим загрузки сессии");
231233
SessionMode = SessionMode.LoadSession; break;
232234

233-
default :
235+
default :
236+
Logger.LogInfo("Выбран режим анонимной сессии");
234237
SessionMode = SessionMode.AnonymousSession; break;
235238
}
236239
}

NotPixelBt/LocalStorageManager.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public void SaveCurrentStorageToJson(string storageName)
2525
string storageJson = GetSessionStorageJson();
2626
string storagePath = Path.Combine(_sessionsStoragePath, storageName+".json");
2727
File.WriteAllText(storagePath, storageJson);
28+
Logger.LogInfo("Сессия сохранена");
2829
}
2930
public void SetCurrentLocalStorage(int index)
3031
{
@@ -36,9 +37,11 @@ public void SetCurrentLocalStorage(int index)
3637
localDictionary.TryGetValue(key, out string value);
3738
Driver.ExecuteScript($"localStorage.setItem('{key}','{value}');");
3839
}
40+
Logger.LogInfo("Локальное хранилище изменено");
3941
}
4042
private string GetSessionStorageJson()
4143
{
44+
Logger.LogInfo("Получено локальное хранилище");
4245
return (string)Driver.ExecuteScript("return JSON.stringify(window.localStorage);"); ;
4346
}
4447
}

0 commit comments

Comments
 (0)