Delete the Telemetry log level (#2727)

It's a bit non-standard, and moreover it's entirely dead.
This commit is contained in:
Michael Peyton Jones 2022-02-21 04:04:39 +00:00 committed by GitHub
parent 3b687a52ac
commit 3084651ba4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 9 deletions

View File

@ -9,7 +9,7 @@ module Development.IDE.Types.Logger
( Priority(..)
, Logger(..)
, Recorder(..)
, logError, logWarning, logInfo, logDebug, logTelemetry
, logError, logWarning, logInfo, logDebug
, noLogging
, WithPriority(..)
, logWith
@ -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
@ -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 ()
@ -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

View File

@ -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)