public void Warning(Exception e, [CallerMemberName] string memberName = "", [CallerFilePath] string sourceFilePath = "", [CallerLineNumber] int sourceLineNumber = 0) { if (!string.IsNullOrEmpty(e.Message)) { AndroidLog.Warn(_target, e.Message); } if (!string.IsNullOrEmpty(e.StackTrace)) { AndroidLog.Warn(_target, e.StackTrace); } CrashlyticsLog(e); Writer.Write(e); if (_xamarinInsights) { Dictionary <string, string> additionalInfo = new Dictionary <string, string> { { "Member Name", memberName }, { "Source Filepath", sourceFilePath }, { "Source Line Number", sourceLineNumber.ToString() }, { "CallStack", _traceEventCache.Callstack } }; Insights.Report(e, additionalInfo); } }
public void Warning(string w, [CallerMemberName] string memberName = "", [CallerFilePath] string sourceFilePath = "", [CallerLineNumber] int sourceLineNumber = 0) { if (w == null) { w = _defaultLogString; } AndroidLog.Warn(_target, w); CrashlyticsLog(w); if (FileExtensiveLogs) { Writer.Write(w); } if (_xamarinInsights) { Dictionary <string, string> additionalInfo = new Dictionary <string, string> { { "Member Name", memberName }, { "Source Filepath", sourceFilePath }, { "Source Line Number", sourceLineNumber.ToString() }, { "CallStack", _traceEventCache.Callstack } }; Insights.Report(new Exception(w), additionalInfo); } }
public static void w(string tag, string msg) { if (LOG_ENABLE) { Log.Warn(tag, msg); } }
protected override void Write(LogEventInfo logEvent) { var logMessage = this.Layout.Render(logEvent); if (logEvent.Level.Equals(LogLevel.Info)) { Log.Info(logEvent.LoggerName, logMessage); return; } if (logEvent.Level.Equals(LogLevel.Debug)) { Log.Debug(logEvent.LoggerName, logMessage); return; } if (logEvent.Level.Equals(LogLevel.Warn)) { Log.Warn(logEvent.LoggerName, logMessage); return; } if (logEvent.Level.Equals(LogLevel.Error)) { Log.Error(logEvent.LoggerName, logMessage); return; } }
public void Log(LogLevel level, string format, object param1, object param2) { switch (level) { case LogLevel.Debug: AndroidLog.Debug(_name, format, param1, param2); break; case LogLevel.Info: AndroidLog.Info(_name, format, param1, param2); break; case LogLevel.Warn: AndroidLog.Warn(_name, format, param1, param2); break; case LogLevel.Error: AndroidLog.Error(_name, format, param1, param2); break; } }
public void Log(LogLevel level, object message) { var s = message.ToString(); switch (level) { case LogLevel.Debug: AndroidLog.Debug(_name, s); break; case LogLevel.Info: AndroidLog.Info(_name, s); break; case LogLevel.Warn: AndroidLog.Warn(_name, s); break; case LogLevel.Error: AndroidLog.Error(_name, s); break; } }
protected override void Warning(ILog log, string message, object extraData, LogData logData, DateTime time) { Log.Warn(Tag, message); }
public void warn(string tag, string text) { ALog.Warn(tag, text); }