From 82cd734ed7e1c600d13c838eb4962c5f7602b2b7 Mon Sep 17 00:00:00 2001
From: h7x4 <h7x4abk3g@protonmail.com>
Date: Sun, 28 Mar 2021 01:11:11 +0100
Subject: [PATCH] Move logger to separate file

---
 src/Bot/Logging.fs          | 8 ++++++++
 src/Bot/WebsiteCheckLoop.fs | 5 +----
 2 files changed, 9 insertions(+), 4 deletions(-)
 create mode 100644 src/Bot/Logging.fs

diff --git a/src/Bot/Logging.fs b/src/Bot/Logging.fs
new file mode 100644
index 0000000..5808e68
--- /dev/null
+++ b/src/Bot/Logging.fs
@@ -0,0 +1,8 @@
+namespace Bot
+
+module Logging =
+
+  open System
+
+  let log message = 
+    printfn "[%A] [Info] %s" DateTime.Now message
\ No newline at end of file
diff --git a/src/Bot/WebsiteCheckLoop.fs b/src/Bot/WebsiteCheckLoop.fs
index 36ebd21..c34999b 100644
--- a/src/Bot/WebsiteCheckLoop.fs
+++ b/src/Bot/WebsiteCheckLoop.fs
@@ -2,13 +2,10 @@ namespace Bot
 
 module WebsiteCheckLoop =
 
-  open System
+  open Logging
   open DSharpPlus
   open Channels
 
-  let private log message = 
-    printfn "[%A] [Info] %s" DateTime.Now message
-
   let private sendToChannelWith (client:DiscordClient) message id = 
     log <| sprintf "Sending message to channel: %A" id
     id
-- 
GitLab