From ec506a7f9e15c08ec1cf75ecc4e12a7a33a456a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Schw=C3=B6rer?= Date: Sun, 2 Jun 2024 16:27:03 +0200 Subject: [PATCH] Add missing exerr.Init() to scnserver --- flutter/lib/pages/debug/debug_actions.dart | 9 +++++++++ scnserver/init.go | 10 ++++++++++ 2 files changed, 19 insertions(+) diff --git a/flutter/lib/pages/debug/debug_actions.dart b/flutter/lib/pages/debug/debug_actions.dart index 5573308..01d4118 100644 --- a/flutter/lib/pages/debug/debug_actions.dart +++ b/flutter/lib/pages/debug/debug_actions.dart @@ -43,10 +43,19 @@ class _DebugActionsPageState extends State { child: const Text('Show Simple Notification'), ), SizedBox(height: 20), + FilledButton( + style: FilledButton.styleFrom(textStyle: const TextStyle(fontSize: 20)), + onPressed: _sendTokenToServer, + child: const Text('Send FCM Token to Server'), + ), ], ), ), ), ); } + + void _sendTokenToServer() { + //TODO + } } diff --git a/scnserver/init.go b/scnserver/init.go index feb0a84..10f8ffd 100644 --- a/scnserver/init.go +++ b/scnserver/init.go @@ -5,6 +5,8 @@ import ( "github.com/gin-gonic/gin" "github.com/rs/zerolog" "github.com/rs/zerolog/log" + "gogs.mikescher.com/BlackForestBytes/goext/exerr" + "gogs.mikescher.com/BlackForestBytes/goext/langext" "os" "path" "path/filepath" @@ -23,6 +25,14 @@ func init() { } func Init(cfg Config) { + exerr.Init(exerr.ErrorPackageConfigInit{ + ZeroLogErrTraces: langext.PTrue, + ZeroLogAllTraces: langext.PTrue, + RecursiveErrors: langext.PTrue, + ExtendedGinOutput: &cfg.ReturnRawErrors, + IncludeMetaInGinOutput: &cfg.ReturnRawErrors, + }) + cw := zerolog.ConsoleWriter{ Out: os.Stdout, TimeFormat: "2006-01-02 15:04:05 Z07:00",