Possibility to disable logging native commands
I have suggestion to add option to disable logging native commands.
I use looped $.native.getNativeViews and my output from flutter logs looks like:
You can already do this by passing your own logger to NativeAutomator.
final config = NativeAutomatorConfig(...);
final automaton = NativeAutomator(
config: nativeAutomatorConfig
logger: (String message) {
// pass `--dart-define PATROL_VERBOSE_LOGS=true` to `patrol_cli` to enable logs
if (const bool.fromEnvironment('PATROL_VERBOSE_LOGS') {
print(message);
}
}
);
Unfortunately you have to instantiate the NativeAutomator object yourself to do this, which is uncommon. Usually, you use patrolTest() function, which creates the logger inside of it, and doesn't allow for a custom logger.
So I think the requeste here is to add nativeAutomatorLogger argument to PatrolTester's constructor.
@bartekpacia We need to be able to do custom logging with patrol, is there any movement on adding nativeAutomatorLogger as an argument to the PatrolTester constructor so it can be used inside patrolTest?
This issue has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar problem, please file a new issue. Make sure to follow the template and provide all the information necessary to reproduce the issue.