OpenFn / OpenFn/lightning

Control log outputs

Open
#1,755 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Epic
Dominant language
Elixir
Stars
296
Forks
86
Avg merge
1d 13h
Merged PRs (30d)
50

Description

Allow authorized users (project owner/admin) to toggle on/off the console.log() statements in the job expressions. When toggled on, console.log() expressions will not be logged in the CLI thus ensuring that sensitive data is not printed in logs.

  • Allow project admin/owner to disable console.log (or console.anything!) statements at a per-workflow level. (Default to enabled.)
  • Allow project admin/owner to select the log levels they want to see in the run logs at a per-workflow level.
  • Users can select ONLY one of the following: [debug, info, warning, error, none] (The list should be the same options you can send to the worker via the CLI. Default to info) (See Joe's extended log levels below)
  • The project editor/viewer can see the log-level configuration but cannot edit it. (Same as all other permission-protected things within a project.)

Acceptance criteria:

  • Only project admins and owners can set log-level configuration
  • This should happen at a workflow level through the workflow settings panel
  • When this feature is enabled, there should be no console.log() in the logs.
  • I should be able to configure the name of a workflow from the workflow settings panel
  • I should be able to configure the log levels
  • I should see statements that tell me the log levels and if printing console.log() is enabled

Implementation on v1:
This feature was on v1 (see image below) but this has not been implemented in v2 even though the worker already supports this.
Image

  • Edit workflow name from the workflow settings panel
  • #2205
  • #2206
  • #1863

Design: https://www.figma.com/design/4hGWdO4sajnjcOwE81j8BK/App-(new)?node-id=4538-643&t=gKE781fliu7QFjgA-0

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 the v1 behavior shown in the linked image, the worker's existing log-level support, and the workflow settings panel described in the issue. Use the linked Figma design to understand the configuration UI and verify that admins and owners can set workflow log levels while viewers and editors can only see them. Done means the settings control log levels and console.log visibility without sensitive statements appearing in CLI run logs.

Written by the indexing model from the issue text.

Assessment

Tech stack
elixir
Domain
authorization, full-stack, observability
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.