Move logger to separate file
This commit is contained in:
8
src/Bot/Logging.fs
Normal file
8
src/Bot/Logging.fs
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
namespace Bot
|
||||||
|
|
||||||
|
module Logging =
|
||||||
|
|
||||||
|
open System
|
||||||
|
|
||||||
|
let log message =
|
||||||
|
printfn "[%A] [Info] %s" DateTime.Now message
|
||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user