| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
CodeScout is a versatile logging solution for Flutter applications, designed to facilitate debugging during development and provide valuable insights post-development through a desktop application using sockets. This logger is particularly useful for QA teams, allowing them to monitor logs related to network API calls, analytics, and other crucial information without requiring a debug connection.
Add the following dependency to your pubspec.yaml file:
dependencies:
code_scout: ^x.x.x # Replace with the latest versionBefore using CodeScout, initialize it with the desired configuration:
void main() {
CodeScout.init(
terimalLoggingConfigutation: CodeScoutLoggingConfiguration(
devTraces: true,
devLogs: true,
networkCall: true,
analyticsLogs: true,
crashLogs: true,
errorLogs: true,
isDebugMode: true,
),
);
// Your app initialization code
}Use the following methods to log different types of messages:
// Development trace
CodeScout.logDevTrace("Development trace message");
// Debug log
CodeScout.logDebug("Debug message");
// Crash log
CodeScout.logCrash("Crash message", error: exception, stackTrace: stackTrace);
// Error log
CodeScout.logError("Error message", error: error);
// Analytics log
CodeScout.logAnalytics("Analytics event");To enable socket-based logging for remote monitoring:
void mySocketLogger(
bool Function(CodeScoutLoggingConfiguration configuration) shouldLog,
OutputEvent? outputEvent
) {
// Implement your socket logging logic here
}CodeScout.bindSocketLogger(mySocketLogger);CodeScout.unbindSocketLogger();The CodeScoutLoggingConfiguration class allows you to customize the logging behavior:
Ensure that sensitive information is not logged in production environments. Always review and sanitize logs before sharing or storing them.
| Back | FazBrowse Home | New Git URL |