[APP-1783] Clean up some feature gates and logging (#9729)
* Remove gates we don't need * Clean up some logging * Keep disable gates around for now * Add missing gate * Revert file * Revert package changes
This commit is contained in:
@@ -1,24 +0,0 @@
|
||||
import {debug, error, info, warn} from '#/logger/bitdrift/lib'
|
||||
import {LogLevel, type Transport} from '#/logger/types'
|
||||
import {prepareMetadata} from '#/logger/util'
|
||||
|
||||
const logFunctions = {
|
||||
[LogLevel.Debug]: debug,
|
||||
[LogLevel.Info]: info,
|
||||
[LogLevel.Log]: info,
|
||||
[LogLevel.Warn]: warn,
|
||||
[LogLevel.Error]: error,
|
||||
} as const
|
||||
|
||||
export const bitdriftTransport: Transport = (
|
||||
level,
|
||||
context,
|
||||
message,
|
||||
metadata,
|
||||
) => {
|
||||
const log = logFunctions[level]
|
||||
log(message.toString(), {
|
||||
__context__: context,
|
||||
...prepareMetadata(metadata),
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user