11using BMM . Api . Framework ;
22using BMM . Core . Constants ;
3- using BMM . Core . Implementations . Exceptions ;
43using BMM . Core . Implementations . Security ;
54using BMM . Core . Utils ;
6- using Microsoft . AppCenter ;
75
86namespace BMM . Core . Implementations . Logger
97{
@@ -25,22 +23,24 @@ protected BaseLogger(
2523 _connection = connection ;
2624 _userStorage = userStorage ;
2725 }
28-
26+
2927 public void Debug ( string tag , string message )
3028 {
31- AppCenterLog . Debug ( tag , message ) ;
29+ Console . WriteLine ( $ "DEBUG - { tag } - { message } " ) ;
3230 }
3331
3432 public void Info ( string tag , string message )
3533 {
36- AppCenterLog . Info ( tag , message ) ;
34+ Console . WriteLine ( $ "INFO - { tag } - { message } " ) ;
3735 }
3836
37+ public abstract void TrackEvent ( string message , IDictionary < string , string > properties ) ;
38+
3939 public void Warn ( string tag , string message )
4040 {
4141 var parameters = InitializeDictionaryWithBasicParameters ( tag , message ) ;
42- AppCenterLog . Warn ( tag , message ) ;
43- Microsoft . AppCenter . Analytics . Analytics . TrackEvent ( "Warning" , parameters ) ;
42+ Console . WriteLine ( $ "WARN - { tag } - { message } " ) ;
43+ TrackEvent ( "Warning" , parameters ) ;
4444 }
4545
4646 public virtual void Error ( string tag , string message )
@@ -51,21 +51,20 @@ public virtual void Error(string tag, string message)
5151 GetSentryScope ( parameters ) ,
5252 SentryLevel . Error ) ;
5353
54- AppCenterLog . Error ( tag , message ) ;
55- Microsoft . AppCenter . Analytics . Analytics . TrackEvent ( "Error without exception" , parameters ) ;
54+ TrackEvent ( "Error without exception" , parameters ) ;
5655 }
5756
5857 public virtual void Error ( string tag , string message , Exception exception , bool presentedToUser = false )
5958 {
6059 var parameters = InitializeDictionaryWithBasicParameters ( tag , message , presentedToUser ) ;
6160
6261 SentrySdk . CaptureException ( exception , GetSentryScope ( parameters ) ) ;
63- AppCenterLog . Error ( tag , message , exception ) ;
64-
62+ Console . WriteLine ( $ "ERROR - { tag } - { message } \n \n { exception } " ) ;
63+
6564 parameters . Add ( StackTrackParameterName , exception . StackTrace ) ;
6665 parameters . Add ( ExceptionParameterName , exception . ToString ( ) ) ;
6766
68- Microsoft . AppCenter . Analytics . Analytics . TrackEvent ( "Error with exception" , parameters ) ;
67+ TrackEvent ( "Error with exception" , parameters ) ;
6968 }
7069
7170 private static Action < Scope > GetSentryScope ( IDictionary < string , string > parameters )
0 commit comments