Skip to content

Commit

Permalink
Remove Log.fs from Fable.Transforms.fsproj
Browse files Browse the repository at this point in the history
  • Loading branch information
nojaf committed Jan 22, 2024
1 parent a6f2941 commit 76def78
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 41 deletions.
15 changes: 6 additions & 9 deletions src/Fable.Compiler/Util.fs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

open System
open System.Threading
open Microsoft.Extensions.Logging
open Microsoft.Extensions.Logging.Abstractions

type RunProcess(exeFile: string, args: string list, ?watch: bool, ?fast: bool) =
member _.ExeFile = exeFile
Expand Down Expand Up @@ -85,6 +83,9 @@ type Agent<'T>

[<RequireQualifiedAccess>]
module Log =
open Microsoft.Extensions.Logging
open Microsoft.Extensions.Logging.Abstractions

let mutable logger: ILogger = NullLogger.Instance
let setLogger newLogger = logger <- newLogger
let newLine = Environment.NewLine
Expand All @@ -100,20 +101,16 @@ module Log =

let error (msg: string) = logger.LogError msg

let info (msg: string) =
if canLog msg then
Console.ForegroundColor <- ConsoleColor.Gray
Console.Out.WriteLine(msg)
Console.ResetColor()
let mutable private femtoMsgShown = false

let info (msg: string) = logger.LogInformation msg

let log (sev: Fable.Severity) (msg: string) =
match sev with
| Fable.Severity.Info -> info msg
| Fable.Severity.Warning -> warning msg
| Fable.Severity.Error -> error msg

let mutable private femtoMsgShown = false

let showFemtoMsg (show: unit -> bool) : unit =
if not femtoMsgShown && verbosity <> Fable.Verbosity.Silent then
if show () then
Expand Down
1 change: 0 additions & 1 deletion src/Fable.Transforms/Fable.Transforms.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<DebugType>embedded</DebugType>
</PropertyGroup>
<ItemGroup>
<Compile Include="Log.fs" />
<Compile Include="Global/Babel.fs" />
<Compile Include="Global/Fable.Core.fs" />
<Compile Include="Global/Metadata.fs" />
Expand Down
31 changes: 0 additions & 31 deletions src/Fable.Transforms/Log.fs

This file was deleted.

0 comments on commit 76def78

Please sign in to comment.