oysteikt/wiki-math-bot
oysteikt
/
wiki-math-bot
Archived
1
0
Fork 0

Move logger to separate file

This commit is contained in:
Oystein Kristoffer Tveit 2021-03-28 01:11:11 +01:00
parent 80f479eca8
commit 82cd734ed7
2 changed files with 9 additions and 4 deletions

8
src/Bot/Logging.fs Normal file
View File

@ -0,0 +1,8 @@
namespace Bot
module Logging =
open System
let log message =
printfn "[%A] [Info] %s" DateTime.Now message

View File

@ -2,13 +2,10 @@ namespace Bot
module WebsiteCheckLoop = module WebsiteCheckLoop =
open System open Logging
open DSharpPlus open DSharpPlus
open Channels open Channels
let private log message =
printfn "[%A] [Info] %s" DateTime.Now message
let private sendToChannelWith (client:DiscordClient) message id = let private sendToChannelWith (client:DiscordClient) message id =
log <| sprintf "Sending message to channel: %A" id log <| sprintf "Sending message to channel: %A" id
id id