Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete the Telemetry log level #2727

Merged
merged 1 commit into from
Feb 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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