freedomofpress / freedomofpress/securedrop-dev

Establish standards for log levels & formats

Open
#25 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

As first noted in https://github.com/freedomofpress/securedrop-client/issues/1166, it would be useful to document how we use different log levels, what format we typically want to use for log lines, and any security considerations for logging. This could be added to the contributor guidelines in https://developers.securedrop.org/en/latest/contributor_guidelines.html

For example:

  • How do we want to use categories like "debug", "informational", "warning", "error", "critical/fatal"?
  • When do we log duration/performance information? For network operations, do we log start/end, or just success/failure?
  • What information should always be redacted from logs?
  • For events spanning multiple entries, do we want to have standard patterns for connecting them, e.g., an event ID?
  • Do we want to consistently support pretty-printing structured log entries using libraries like structlog (Python) or pino (Node)?

This would be good to establish early for the SecureDrop Client rewrite so we can pattern preferred practices there and then potentially apply them elsewhere.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing issue #1166 and the contributor guidelines at developers.securedrop.org/en/latest/contributor_guidelines.html. Define guidance for log levels, formats, performance and network-operation logging, redaction, event correlation, and structured logging. Done means the agreed standards are documented for the SecureDrop Client rewrite and possible reuse elsewhere.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, python
Domain
documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.