Skip to content

Commit

Permalink
Delete the Telemetry log level (#2727)
Browse files Browse the repository at this point in the history
It's a bit non-standard, and moreover it's entirely dead.
  • Loading branch information
michaelpj authored Feb 21, 2022
1 parent 3b687a5 commit 3084651
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
10 changes: 2 additions & 8 deletions ghcide/src/Development/IDE/Types/Logger.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module Development.IDE.Types.Logger
( Priority(..)
, Logger(..)
, Recorder(..)
, logError, logWarning, logInfo, logDebug, logTelemetry
, logError, logWarning, logInfo, logDebug
, noLogging
, WithPriority(..)
, logWith
Expand Down Expand Up @@ -56,8 +56,7 @@ import UnliftIO (MonadUnliftIO, displayException,
data Priority
-- Don't change the ordering of this type or you will mess up the Ord
-- instance
= Telemetry -- ^ Events that are useful for gathering user metrics.
| Debug -- ^ Verbose debug logging.
= Debug -- ^ Verbose debug logging.
| Info -- ^ Useful information in case an error has to be understood.
| Warning
-- ^ These error messages should not occur in a expected usage, and
Expand Down Expand Up @@ -88,10 +87,6 @@ logInfo x = logPriority x Info
logDebug :: Logger -> T.Text -> IO ()
logDebug x = logPriority x Debug

logTelemetry :: Logger -> T.Text -> IO ()
logTelemetry x = logPriority x Telemetry


noLogging :: Logger
noLogging = Logger $ \_ _ -> return ()

Expand Down Expand Up @@ -208,7 +203,6 @@ makeDefaultHandleRecorder columns minPriority lock handle = do

priorityToHsLoggerPriority :: Priority -> HsLogger.Priority
priorityToHsLoggerPriority = \case
Telemetry -> HsLogger.INFO
Debug -> HsLogger.DEBUG
Info -> HsLogger.INFO
Warning -> HsLogger.WARNING
Expand Down
1 change: 0 additions & 1 deletion src/Ide/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ defaultMain recorder args idePlugins = do
hlsLogger :: G.Logger
hlsLogger = G.Logger $ \pri txt ->
case pri of
G.Telemetry -> logm (T.unpack txt)
G.Debug -> debugm (T.unpack txt)
G.Info -> logm (T.unpack txt)
G.Warning -> warningm (T.unpack txt)
Expand Down

0 comments on commit 3084651

Please sign in to comment.