ExportConfig class
Configuration options for log export and sharing functionality.
ExportConfig specifies how log data can be exported from the console, what formats are available, how files should be named and organized, and what security restrictions should be applied to exported data.
Security Considerations:
- Exported data may contain sensitive information
- Consider restricting formats and destinations in production
- Apply data sanitization before export
- Control sharing mechanisms to prevent data leakage
Performance Considerations:
- Large log datasets can take time to export
- Some formats (PDF, HTML) are more processing-intensive
- File I/O operations may block the UI thread
- Consider background processing for large exports
Example configurations:
// Development configuration (full export capabilities)
const devConfig = ExportConfig(
allowedFormats: ExportFormat.values, // All formats
allowSharing: true,
includeMetadata: true,
includeSystemInfo: true,
);
// Production configuration (restricted export)
const prodConfig = ExportConfig(
allowedFormats: [ExportFormat.json], // JSON only
allowSharing: false, // No platform sharing
includeMetadata: false,
maxEntriesPerExport: 1000, // Limit export size
);
Constructors
-
ExportConfig({List<
ExportFormat> allowedFormats = const [ExportFormat.json], bool allowSharing = true, bool includeMetadata = true, bool includeSystemInfo = false, bool includePerformanceMetrics = true, bool includeNetworkData = false, int maxEntriesPerExport = 10000, String fileNameTemplate = 'backstage_export_{timestamp}.{format}', String exportDirectory = 'backstage_exports', bool autoCleanupExports = true, int exportRetentionDays = 7, bool compressExports = true, int compressionLevel = 6, bool includeStackTraces = true, bool encryptSensitiveExports = false, List<String> excludeTags = const [], List<String> excludeLogLevels = const [], bool showExportProgress = true}) -
Creates a new export configuration with the specified options.
const
Properties
-
allowedFormats
→ List<
ExportFormat> -
List of export formats that should be available to users.
final
- allowSharing → bool
-
Whether to enable platform sharing functionality.
final
- autoCleanupExports → bool
-
Whether to automatically clean up old export files.
final
- compressExports → bool
-
Whether to compress export files to save space and transfer time.
final
- compressionLevel → int
-
Compression level for export files (0-9, higher = more compression).
final
- encryptSensitiveExports → bool
-
Whether to encrypt sensitive export files.
final
-
excludeLogLevels
→ List<
String> -
List of log levels that should be excluded from exports.
final
-
excludeTags
→ List<
String> -
List of log tags that should be excluded from exports.
final
- exportDirectory → String
-
Directory path for saving export files (relative to app documents).
final
- exportRetentionDays → int
-
Number of days to retain export files before automatic cleanup.
final
- fileNameTemplate → String
-
Template for export file naming.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- includeMetadata → bool
-
Whether to include metadata in exported files.
final
- includeNetworkData → bool
-
Whether to include network request data in exports.
final
- includePerformanceMetrics → bool
-
Whether to include performance metrics in exports.
final
- includeStackTraces → bool
-
Whether to include stack traces in exported error logs.
final
- includeSystemInfo → bool
-
Whether to include system information in exports.
final
- maxEntriesPerExport → int
-
Maximum number of log entries to include in a single export.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showExportProgress → bool
-
Whether to show export progress for large operations.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited