Line data Source code
1 : import 'package:flutter/material.dart'; 2 : 3 : class LoggerService { 4 0 : static void log(String tag, String message, [StackTrace? st]) { 5 0 : debugPrint("[$tag] $message"); 6 0 : if (st != null) debugPrint(st.toString()); 7 : 8 : // Remote logging 9 : // Sentry.captureMessage(message); 10 : } 11 : 12 5 : static void error(String tag, String message, [StackTrace? st]) { 13 15 : debugPrint("[ERROR][$tag] $message"); 14 12 : if (st != null) debugPrint(st.toString()); 15 : // Remote logging 16 : // Sentry.captureException(Exception(message), stackTrace: st); 17 : } 18 : }