Skip to content

Commit

Permalink
redeprecate Severity
Browse files Browse the repository at this point in the history
  • Loading branch information
lobsterkatie committed Apr 13, 2022
1 parent 588252a commit a042bed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion packages/types/src/severity.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/**
* TODO(v7): Remove this enum and replace with SeverityLevel
* @deprecated Please use a `SeverityLevel` string instead of the `Severity` enum. Acceptable values are 'fatal',
* 'critical', 'error', 'warning', 'log', 'info', and 'debug'.
*/
export enum Severity {
/** JSDoc */
Expand Down
7 changes: 4 additions & 3 deletions packages/utils/src/severity.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { Severity, SeverityLevel } from '@sentry/types';

// TODO: Should `severityFromString` be deprecated?

// Note: Ideally the `SeverityLevel` type would be derived from `validSeverityLevels`, but that would mean either
//
// a) moving `validSeverityLevels` to `@sentry/types`,
Expand All @@ -15,7 +13,10 @@ import { Severity, SeverityLevel } from '@sentry/types';
export const validSeverityLevels = ['fatal', 'error', 'warning', 'log', 'info', 'debug', 'critical'];

/**
* Converts a string-based level into a member of the {@link Severity} enum.
* Converts a string-based level into a member of the deprecated {@link Severity} enum.
*
* @deprecated Please use a `SeverityLevel` string instead of the `Severity` enum. Acceptable values are 'fatal',
* 'critical', 'error', 'warning', 'log', 'info', and 'debug'.
*
* @param level String representation of Severity
* @returns Severity
Expand Down

0 comments on commit a042bed

Please sign in to comment.