diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2024-02-18 08:01:22 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-18 13:01:22 +0000 |
commit | 90449bc745546f0f25bc93ee4b06d21b7c0210e8 (patch) | |
tree | 728153aaa4588a7340c3f3a45008989c0f5521b3 /types | |
parent | c2e3f60e51529f05284fea5f5bc1afcd1674f5ca (diff) |
Log update (#701)
* Don't export Logger
* Rename logger.js to log.js
* Move helper function
* Update extension name configuration
* Simplify docs
* Move issue URL to a field
* Simplify context
* Remove optional params that are never used
* Configure backend
* Update eslint
* Simplify
* Rename function
* Simplify _api reference
* Simplify docs
* Remove unused log levels (except 'log')
* Add log function
* Rename for more clear intent
* Use log.log
Diffstat (limited to 'types')
-rw-r--r-- | types/ext/api.d.ts | 2 | ||||
-rw-r--r-- | types/ext/log.d.ts | 12 |
2 files changed, 3 insertions, 11 deletions
diff --git a/types/ext/api.d.ts b/types/ext/api.d.ts index 85f4c146..401cb1a5 100644 --- a/types/ext/api.d.ts +++ b/types/ext/api.d.ts @@ -289,7 +289,7 @@ type ApiSurface = { }; return: DictionaryDatabase.MediaDataStringContent[]; }; - log: { + logGenericErrorBackend: { params: { error: Core.SerializedError; level: Log.LogLevel; diff --git a/types/ext/log.d.ts b/types/ext/log.d.ts index 5b33b234..af906387 100644 --- a/types/ext/log.d.ts +++ b/types/ext/log.d.ts @@ -17,22 +17,14 @@ import type {EventNames, EventArgument as BaseEventArgument} from './core'; -export type LogLevel = 'log' | 'info' | 'debug' | 'warn' | 'error'; +export type LogLevel = 'log' | 'warn' | 'error'; export type LogContext = { url: string; }; -/** - * An enum representing the log error level. - * - `0` - _log_, _info_, _debug_ level. - * - `1` - _warn_ level. - * - `2` - _error_ level. - */ -export type LogErrorLevelValue = 0 | 1 | 2; - export type Events = { - log: { + logGenericError: { error: unknown; level: LogLevel; context: LogContext; |