aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ui/ui.go
diff options
context:
space:
mode:
authorAlexander Neumann <alexander.neumann@picos-software.com>2019-04-11 11:13:36 +0200
committerAlexander Neumann <alexander.neumann@picos-software.com>2019-04-23 11:04:59 +0200
commit8073768c6136e9b8b00dcefbc09e69033ad5b308 (patch)
tree870af63b08accfca927ed02c2c082136cb6eb3db /ui/ui.go
parentui: implement about dialog, version info still TODO (diff)
downloadwireguard-windows-8073768c6136e9b8b00dcefbc09e69033ad5b308.tar.xz
wireguard-windows-8073768c6136e9b8b00dcefbc09e69033ad5b308.zip
ui: implement export log action
Signed-off-by: Alexander Neumann <alexander.neumann@picos-software.com>
Diffstat (limited to 'ui/ui.go')
-rw-r--r--ui/ui.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/ui/ui.go b/ui/ui.go
index 8ba8725d..c068795f 100644
--- a/ui/ui.go
+++ b/ui/ui.go
@@ -12,6 +12,7 @@ import (
"time"
"github.com/lxn/walk"
+ "golang.zx2c4.com/wireguard/windows/ringlogger"
"golang.zx2c4.com/wireguard/windows/service"
)
@@ -33,6 +34,12 @@ func nag() {
func RunUI() {
runtime.LockOSThread()
+ logger, err := ringlogger.NewRingloggerFromInheritedMappingHandle(os.Args[5], "GUI")
+ if err != nil {
+ walk.MsgBox(nil, "Unable to initialize logging", fmt.Sprint(err), walk.MsgBoxIconError)
+ return
+ }
+
tunnelTracker := new(TunnelTracker)
icon, err := walk.NewIconFromResourceId(1)
@@ -41,7 +48,7 @@ func RunUI() {
}
defer icon.Dispose()
- mtw, err := NewManageTunnelsWindow(icon)
+ mtw, err := NewManageTunnelsWindow(icon, logger)
if err != nil {
panic(err)
}