Skip to main content

Crate systemprompt_logging

Crate systemprompt_logging 

Source
Expand description

§systemprompt-logging

Tracing and audit infrastructure for systemprompt.io. Owns the structured-event pipeline, the database-backed tracing layer, log/analytics repositories, and the CLI display sinks. The trace-assembly queries over agent, AI and MCP tables live in systemprompt_runtime::trace.

§Feature flags

FeatureDescription
(default)Database layer, repositories
cliCLI display helpers (CliService, tables, banners) — pulls in console, indicatif

§Top-level entry points

Copyright (c) systemprompt.io — Business Source License 1.1. See https://systemprompt.io for licensing details.

Re-exports§

pub use attribution::LogAttributionUnset;
pub use attribution::install_log_attribution;
pub use attribution::platform_attribution;
pub use extension::LoggingExtension;
pub use layer::DatabaseLayer;
pub use layer::LogWriterHandle;
pub use layer::LogWriterShutdownError;
pub use layer::enqueue_background;
pub use models::LogActor;
pub use models::LogEntry;
pub use models::LogFilter;
pub use models::LogLevel;
pub use repository::AnalyticsEvent;
pub use repository::AnalyticsRepository;
pub use repository::LoggingOwnerReassignment;
pub use repository::LoggingRepository;
pub use services::CliService;
pub use services::BufferedNotice;
pub use services::DatabaseLogService;
pub use services::FilterSystemFields;
pub use services::LogThrottle;
pub use services::LoggingMaintenanceService;
pub use services::SystemSpan;
pub use services::buffer_notice;
pub use services::drain_notices;
pub use services::is_startup_mode;
pub use services::is_structured_output;
pub use services::mark_structured_emitted;
pub use services::reset_structured_emitted;
pub use services::set_startup_mode;
pub use services::set_structured_output;
pub use services::structured_was_emitted;

Modules§

attribution
Logging-side attribution cell.
extension
Extension registration for the logging subsystem: schema, priority, required flag.
layer
tracing subscriber layer that persists events to the database.
models
Logging domain types: entries, levels, filters, and errors.
repository
Log persistence repository.
sanitize
Shared field-value sanitization for the console and database log sinks.
services
Logging services: the tracing write path and span helpers.

Macros§

cli_error
cli_info
cli_success
cli_warning

Functions§

init_console_logging
init_console_logging_with_level
init_logging
instance_id
set_instance_id
shutdown_database_logging