PowerShell / PowerShell/vscode-powershell

RFC: Standardize Logging Levels and Meanings

Abierto
#5,101 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Area-Logging Issue-Enhancement
Lenguaje dominante
TypeScript
Estrellas
1.9k
Forks
548
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

Prerequisites
  • I have written a descriptive issue title.
  • I have searched all issues to ensure it has not already been reported.
Summary

Now that the logging infrastructure has been relatively standardized between vscode-powershell and PSES, I feel like we need to add some logging guidelines to the developer guide, and update severities for existing messages.

Proposed Design

I want there to be specific "layers" that you peel back as you need to investigate an issue, here's my thoughts in order of least verbose to most verbose:

  • Critical: Fully unhandled exceptions or anything causing a hard stop/panic of PSES or the editor. These would almost always be surfaced as warning dialogs if at all possible.
  • Error: Some functionality of the extension/LSP did not complete, but was handled and does not require a critical restart of the environment. Not necessarily surfaced to user outside of logs unless action required. No values shown unless it's explicitly relevant to the error (e.g. expected x but received y)
  • Warning: Degraded but successfully completed behavior, Notify of deprecated functionality. Same rules as error (action required). Warning would be the default level, basically not logging anything and keeping performance up with logging noops unless something goes wrong (Maybe Info is better for newbies)
  • Info/Verbose: Logs the high level steps of the initialization of PSES, and any configuration or operational changes.
  • Debug: Logs the invocation of handlers, summary of request/response (without values), detail about steps such as launch process, etc.
  • Trace: Full protocol logging including values

The overarching idea is that anything Debug or above would only contain values/potential PII about the environment itself, whereas trace may include everything the user did or requested including script contents, so users can feel fairly safe about analyzing and submitting debug level reports, whereas trace reports may require some sanitization.

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza leyendo la guía para desarrolladores y la infraestructura de logging existente en vscode-powershell y PSES. Relaciona las severidades actuales de los mensajes con los significados propuestos de Critical-through-Trace, documenta después las directrices y actualiza las severidades existentes; el trabajo estará terminado cuando la guía y los mensajes sigan un estándar coherente.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
powershell, typescript, vscode
Área
documentation, observability
Tipo de issue
Refactorización
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
30/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.