Everything involving "logLevel" is awful #740
Labels
api: clouderrorreporting
Issues related to the googleapis/nodejs-error-reporting API.
priority: p3
Desirable enhancement or fix. May not be included in next release.
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
Given
new ErrorReporting(initConfiguration?: ConfigurationOptions)
and
A user has no idea what "logLevel" means / will induce with the error report. Allowing it to be a string or a number has a rather wide possibility space! And what it does is not mentioned in the docs.
I think what was intended was for "logLevel" to represent Severity.
I furthermore think that, instead of the type being:
logLevel?: string | number
It was intended to be / ought to be:
logLevel?: LogLevel
Per google-cloud\error-reporting\build\src\configuration.d.ts:
export type LogLevel = 'error' | 'trace' | 'debug' | 'info' | 'warn' | 'fatal' | undefined;
I propose that "logLevel" be renamed "severity", with:
and
export type LogSeverity = 'error' | 'trace' | 'debug' | 'info' | 'warn' | 'fatal' | undefined;
I furthermore propose that LogSeverity be mentioned in the docs.
The text was updated successfully, but these errors were encountered: