Skip to content

Commit 3084651

Browse files
authored
Delete the Telemetry log level (#2727)
It's a bit non-standard, and moreover it's entirely dead.
1 parent 3b687a5 commit 3084651

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

Diff for: ghcide/src/Development/IDE/Types/Logger.hs

+2-8
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module Development.IDE.Types.Logger
99
( Priority(..)
1010
, Logger(..)
1111
, Recorder(..)
12-
, logError, logWarning, logInfo, logDebug, logTelemetry
12+
, logError, logWarning, logInfo, logDebug
1313
, noLogging
1414
, WithPriority(..)
1515
, logWith
@@ -56,8 +56,7 @@ import UnliftIO (MonadUnliftIO, displayException,
5656
data Priority
5757
-- Don't change the ordering of this type or you will mess up the Ord
5858
-- instance
59-
= Telemetry -- ^ Events that are useful for gathering user metrics.
60-
| Debug -- ^ Verbose debug logging.
59+
= Debug -- ^ Verbose debug logging.
6160
| Info -- ^ Useful information in case an error has to be understood.
6261
| Warning
6362
-- ^ These error messages should not occur in a expected usage, and
@@ -88,10 +87,6 @@ logInfo x = logPriority x Info
8887
logDebug :: Logger -> T.Text -> IO ()
8988
logDebug x = logPriority x Debug
9089

91-
logTelemetry :: Logger -> T.Text -> IO ()
92-
logTelemetry x = logPriority x Telemetry
93-
94-
9590
noLogging :: Logger
9691
noLogging = Logger $ \_ _ -> return ()
9792

@@ -208,7 +203,6 @@ makeDefaultHandleRecorder columns minPriority lock handle = do
208203

209204
priorityToHsLoggerPriority :: Priority -> HsLogger.Priority
210205
priorityToHsLoggerPriority = \case
211-
Telemetry -> HsLogger.INFO
212206
Debug -> HsLogger.DEBUG
213207
Info -> HsLogger.INFO
214208
Warning -> HsLogger.WARNING

Diff for: src/Ide/Main.hs

-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ defaultMain recorder args idePlugins = do
112112
hlsLogger :: G.Logger
113113
hlsLogger = G.Logger $ \pri txt ->
114114
case pri of
115-
G.Telemetry -> logm (T.unpack txt)
116115
G.Debug -> debugm (T.unpack txt)
117116
G.Info -> logm (T.unpack txt)
118117
G.Warning -> warningm (T.unpack txt)

0 commit comments

Comments
 (0)