LogCleaner class
A class responsible for cleaning logs in Dart files.
The LogCleaner
class processes files in a specified directory, identifies
log patterns, and removes lines matching those patterns. It handles
recursively searching for Dart files and cleaning them based on the patterns
provided.
Example usage:
final logCleaner = LogCleaner('path/to/directory', [RegExp('log\\(.*\\);')]);
final result = logCleaner.cleanLogs();
print(result.message);
Constructors
-
LogCleaner.new(String directoryPath, List<
RegExp> logPatterns) -
Constructor for initializing the
LogCleaner
with a directory path and log patterns.
Properties
- directoryPath → String
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
logPatterns
→ List<
RegExp> -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
cleanLogs(
) → LogRemovalResult - Cleans logs from Dart files in the specified directory.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited