mirror of
https://gitlab.com/mysocialportal/relatica
synced 2024-10-18 12:23:31 +00:00
Tweaks to logging levels
This commit is contained in:
parent
338547203d
commit
12233c4320
14 changed files with 33 additions and 31 deletions
|
@ -57,7 +57,7 @@ class _MediaKitAvControlState extends State<MediaKitAvControl> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
_logger.finer('Building MediaKit Control for ${widget.videoUrl}');
|
||||
_logger.finest('Building MediaKit Control for ${widget.videoUrl}');
|
||||
if (controller == null) {
|
||||
return Container(
|
||||
width: widget.width,
|
||||
|
|
|
@ -51,14 +51,14 @@ class _InteractionsBarControlState extends State<InteractionsBarControl> {
|
|||
isProcessing = true;
|
||||
});
|
||||
final newState = !isFavorited;
|
||||
_logger.finest('Trying to toggle favorite from $isFavorited to $newState');
|
||||
_logger.fine('Trying to toggle favorite from $isFavorited to $newState');
|
||||
final result = await getIt<ActiveProfileSelector<TimelineManager>>()
|
||||
.activeEntry
|
||||
.andThenAsync(
|
||||
(tm) async => await tm.toggleFavorited(widget.entry.id, newState));
|
||||
result.match(onSuccess: (update) {
|
||||
setState(() {
|
||||
_logger.finest(
|
||||
_logger.fine(
|
||||
'Success toggling! $isFavorited -> ${update.entry.isFavorited}');
|
||||
});
|
||||
}, onError: (error) {
|
||||
|
@ -93,14 +93,14 @@ class _InteractionsBarControlState extends State<InteractionsBarControl> {
|
|||
}
|
||||
|
||||
final id = widget.entry.id;
|
||||
_logger.finest('Trying to reshare $id');
|
||||
_logger.fine('Trying to reshare $id');
|
||||
final result = await getIt<ActiveProfileSelector<TimelineManager>>()
|
||||
.activeEntry
|
||||
.andThenAsync((tm) async => await tm.resharePost(id));
|
||||
|
||||
result.match(onSuccess: (update) {
|
||||
setState(() {
|
||||
_logger.finest('Success resharing post by ${widget.entry.author}');
|
||||
_logger.fine('Success resharing post by ${widget.entry.author}');
|
||||
});
|
||||
}, onError: (error) {
|
||||
buildSnackbar(context, 'Error resharing post by ${widget.entry.author}');
|
||||
|
@ -122,13 +122,13 @@ class _InteractionsBarControlState extends State<InteractionsBarControl> {
|
|||
isProcessing = true;
|
||||
});
|
||||
final id = widget.entry.id;
|
||||
_logger.finest('Trying to un-reshare $id');
|
||||
_logger.fine('Trying to un-reshare $id');
|
||||
final result = await getIt<ActiveProfileSelector<TimelineManager>>()
|
||||
.activeEntry
|
||||
.andThenAsync((tm) async => await tm.unResharePost(id));
|
||||
result.match(onSuccess: (update) {
|
||||
setState(() {
|
||||
_logger.finest('Success un-resharing post by ${widget.entry.author}');
|
||||
_logger.fine('Success un-resharing post by ${widget.entry.author}');
|
||||
});
|
||||
}, onError: (error) {
|
||||
buildSnackbar(
|
||||
|
|
|
@ -74,7 +74,7 @@ class _PostControlState extends State<PostControl> {
|
|||
final int scrollToIndex = _scrollToIndexCalc(items);
|
||||
|
||||
// TODO Figure out why doesn't scroll to correct position on loading
|
||||
_logger.finer('Building view with initial position at $scrollToIndex');
|
||||
_logger.finest('Building view with initial position at $scrollToIndex');
|
||||
|
||||
return ScrollablePositionedList.builder(
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
|
|
|
@ -817,6 +817,8 @@ class StatusesClient extends FriendicaClient {
|
|||
...descendants
|
||||
.map((d) => TimelineEntryMastodonExtensions.fromJson(d))
|
||||
];
|
||||
_logger.finer(() =>
|
||||
'Got status $id with full context which returned ${ancestors.length} ancestors and ${descendants.length} descendants');
|
||||
return items;
|
||||
} else {
|
||||
return [TimelineEntryMastodonExtensions.fromJson(json)];
|
||||
|
|
|
@ -84,7 +84,7 @@ class _EditorScreenState extends State<EditorScreen> {
|
|||
parentEntry = entry;
|
||||
visibility = entry.visibility;
|
||||
}, onError: (error) {
|
||||
_logger.finest('Error trying to get parent entry: $error');
|
||||
_logger.severe('Error trying to get parent entry: $error');
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -96,13 +96,13 @@ class _EditorScreenState extends State<EditorScreen> {
|
|||
}
|
||||
|
||||
void restoreStatusData() async {
|
||||
_logger.fine('Attempting to load status for editing');
|
||||
_logger.finer('Attempting to load status for editing');
|
||||
loaded = false;
|
||||
final result = await getIt<ActiveProfileSelector<TimelineManager>>()
|
||||
.activeEntry
|
||||
.andThenAsync((manager) async => manager.getEntryById(widget.id));
|
||||
result.match(onSuccess: (entry) {
|
||||
_logger.fine('Loading status ${widget.id} information into fields');
|
||||
_logger.finer('Loading status ${widget.id} information into fields');
|
||||
contentController.text = htmlToSimpleText(entry.body);
|
||||
spoilerController.text = entry.spoilerText;
|
||||
existingMediaItems
|
||||
|
@ -227,7 +227,7 @@ class _EditorScreenState extends State<EditorScreen> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
_logger.finest('Build editor $isComment $parentEntry');
|
||||
_logger.finer('Build editor $isComment $parentEntry');
|
||||
final manager = context
|
||||
.read<ActiveProfileSelector<TimelineManager>>()
|
||||
.activeEntry
|
||||
|
|
|
@ -67,7 +67,7 @@ class _FilterEditorScreenState extends State<FilterEditorScreen> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
_logger.finer('Build for filter ${widget.id}');
|
||||
_logger.finest('Build for filter ${widget.id}');
|
||||
final fieldWidth = MediaQuery.of(context).size.width * 0.8;
|
||||
final service = context
|
||||
.watch<ActiveProfileSelector<TimelineEntryFilterService>>()
|
||||
|
|
|
@ -84,7 +84,7 @@ class GalleryBrowsersScreen extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
_logger.finest('Building');
|
||||
_logger.finer('Building');
|
||||
final service = context
|
||||
.watch<ActiveProfileSelector<GalleryService>>()
|
||||
.activeEntry
|
||||
|
|
|
@ -24,7 +24,7 @@ class GalleryScreen extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
_logger.finest('Building $galleryName');
|
||||
_logger.finer('Building $galleryName');
|
||||
final nss = getIt<NetworkStatusService>();
|
||||
return Scaffold(
|
||||
appBar: StandardAppBar.build(context, galleryName, actions: [
|
||||
|
@ -59,7 +59,7 @@ class _GalleryScreenBody extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
_logger.finest('Building');
|
||||
_logger.finer('Building');
|
||||
final service = context
|
||||
.watch<ActiveProfileSelector<GalleryService>>()
|
||||
.activeEntry
|
||||
|
|
|
@ -29,7 +29,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||
TimelineIdentifiers currentTimeline = TimelineIdentifiers.home();
|
||||
|
||||
void updateTimeline(TimelineManager manager) {
|
||||
_logger.finest('Updating timeline: $currentTimeline');
|
||||
_logger.finer('Updating timeline: $currentTimeline');
|
||||
Future.delayed(const Duration(milliseconds: 100), () async {
|
||||
await manager.updateTimeline(
|
||||
currentTimeline, TimelineRefreshType.refresh);
|
||||
|
|
|
@ -25,7 +25,7 @@ class NotificationsScreen extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
_logger.finest('Building');
|
||||
_logger.finer('Building');
|
||||
final nss = getIt<NetworkStatusService>();
|
||||
final managerResult = context
|
||||
.watch<ActiveProfileSelector<NotificationsManager>>()
|
||||
|
|
|
@ -101,7 +101,7 @@ class _SearchScreenState extends State<SearchScreen> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
_logger.info('Build');
|
||||
_logger.finer('Build');
|
||||
final nss = getIt<NetworkStatusService>();
|
||||
final profileService = context.watch<AccountsService>();
|
||||
final profile = profileService.currentProfile;
|
||||
|
@ -205,7 +205,7 @@ class _SearchScreenState extends State<SearchScreen> {
|
|||
}
|
||||
|
||||
Widget buildResultBody(Profile profile) {
|
||||
_logger.fine('Building search result body with: $searchResult');
|
||||
_logger.finer('Building search result body with: $searchResult');
|
||||
switch (searchType) {
|
||||
case SearchTypes.hashTag:
|
||||
return buildHashtagResultWidget(profile);
|
||||
|
|
|
@ -51,7 +51,7 @@ class BlocksManager extends ChangeNotifier {
|
|||
);
|
||||
}).match(
|
||||
onSuccess: (blockedUser) {
|
||||
_logger.finest(
|
||||
_logger.fine(
|
||||
'Successfully blocked ${blockedUser.name}: ${blockedUser.status}');
|
||||
final existingIndex = _blocks.indexOf(connection);
|
||||
if (existingIndex < 0) {
|
||||
|
@ -71,8 +71,8 @@ class BlocksManager extends ChangeNotifier {
|
|||
}
|
||||
|
||||
Future<void> unblockConnection(Connection connection) async {
|
||||
_logger.finest(
|
||||
'Attempting to unblock ${connection.name}: ${connection.status}');
|
||||
_logger
|
||||
.fine('Attempting to unblock ${connection.name}: ${connection.status}');
|
||||
await RelationshipsClient(profile)
|
||||
.unblockConnection(connection)
|
||||
.withResult((blockedUser) {
|
||||
|
@ -83,7 +83,7 @@ class BlocksManager extends ChangeNotifier {
|
|||
);
|
||||
}).match(
|
||||
onSuccess: (unblockedUser) {
|
||||
_logger.finest(
|
||||
_logger.fine(
|
||||
'Successfully unblocked ${unblockedUser.name}: ${unblockedUser.status}');
|
||||
final existingIndex = _blocks.indexOf(connection);
|
||||
if (existingIndex >= 0) {
|
||||
|
|
|
@ -53,7 +53,7 @@ class TimelineManager extends ChangeNotifier {
|
|||
}
|
||||
|
||||
Future<void> _refreshCircleData() async {
|
||||
_logger.finest('Refreshing member circle data ');
|
||||
_logger.finer('Refreshing member circle data ');
|
||||
await CirclesClient(profile).getCircles().match(
|
||||
onSuccess: (circles) {
|
||||
circlesRepo.addAllCircles(circles);
|
||||
|
@ -217,10 +217,10 @@ class TimelineManager extends ChangeNotifier {
|
|||
|
||||
FutureResult<EntryTreeItem, ExecError> toggleFavorited(
|
||||
String id, bool newStatus) async {
|
||||
_logger.finest('Attempting toggling favorite $id to $newStatus');
|
||||
_logger.finer('Attempting toggling favorite $id to $newStatus');
|
||||
final result = await entryManagerService.toggleFavorited(id, newStatus);
|
||||
if (result.isFailure) {
|
||||
_logger.finest('Error toggling favorite $id: ${result.error}');
|
||||
_logger.info('Error toggling favorite $id: ${result.error}');
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ FutureResult<PagedResponse<String>, ExecError> getUrl(
|
|||
Map<String, String>? headers,
|
||||
Duration? timeout,
|
||||
}) async {
|
||||
_logger.finer('GET: $url');
|
||||
_logger.fine('GET: $url');
|
||||
final requestHeaders = headers ?? {};
|
||||
if (usePhpDebugging) {
|
||||
requestHeaders['Cookie'] = 'XDEBUG_SESSION=PHPSTORM;path=/';
|
||||
|
@ -54,7 +54,7 @@ FutureResult<String, ExecError> postUrl(
|
|||
Map<String, String>? headers,
|
||||
Duration? timeout,
|
||||
}) async {
|
||||
_logger.finer('POST: $url \n Body: $body');
|
||||
_logger.fine('POST: $url \n Body: $body');
|
||||
final requestHeaders = headers ?? {};
|
||||
if (usePhpDebugging) {
|
||||
requestHeaders['Cookie'] = 'XDEBUG_SESSION=PHPSTORM;path=/';
|
||||
|
@ -88,7 +88,7 @@ FutureResult<String, ExecError> putUrl(
|
|||
Map<String, dynamic> body, {
|
||||
Map<String, String>? headers,
|
||||
}) async {
|
||||
_logger.finer('PUT: $url \n Body: $body');
|
||||
_logger.fine('PUT: $url \n Body: $body');
|
||||
try {
|
||||
final request = http.put(
|
||||
url,
|
||||
|
@ -118,7 +118,7 @@ FutureResult<String, ExecError> deleteUrl(
|
|||
Map<String, dynamic> body, {
|
||||
Map<String, String>? headers,
|
||||
}) async {
|
||||
_logger.finer('DELETE: $url');
|
||||
_logger.fine('DELETE: $url');
|
||||
try {
|
||||
final request = http.delete(
|
||||
url,
|
||||
|
|
Loading…
Reference in a new issue