Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optional logging mechanism #26

Open
simonw opened this issue Nov 26, 2023 · 2 comments
Open

Optional logging mechanism #26

simonw opened this issue Nov 26, 2023 · 2 comments
Labels
design enhancement New feature or request

Comments

@simonw
Copy link
Collaborator

simonw commented Nov 26, 2023

Developing and debugging enrichments will be easier with a logging mechanism.

I'm already planning one of these specifically for errors:

But it strikes me that a _enrichment_logs table which is optionally used would be extremely handy too.

Maybe there's a checkbox for "enable debug logging" on the configure form? Or maybe it's a setting you have to turn on in plugin configuration settings. Or maybe it should default to having logs turned on unless you turn them off?

@simonw simonw added enhancement New feature or request design labels Nov 26, 2023
@simonw
Copy link
Collaborator Author

simonw commented Nov 26, 2023

Table design:

create table if not exists _enrichment_logs (
    id integer primary key,
    job_id integer references _enrichment_jobs(id),
    message text,
    created_at text
)

@simonw
Copy link
Collaborator Author

simonw commented Nov 29, 2023

Another way logging could work is that instead of being persisted to the database it could go to an in-memory storage of some sort, which could then be streamed to clients that want to see it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant