mirror of
https://github.com/Nanaloveyuki/BitLogger.git
synced 2026-07-24 00:42:18 +00:00
📝 add generated package interface snapshots
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
// Generated using `moon info`, DON'T EDIT IT
|
||||
package "Nanaloveyuki/BitLogger/examples/basic"
|
||||
|
||||
// Values
|
||||
|
||||
// Errors
|
||||
|
||||
// Types and methods
|
||||
|
||||
// Type aliases
|
||||
|
||||
// Traits
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
// Generated using `moon info`, DON'T EDIT IT
|
||||
package "Nanaloveyuki/BitLogger/examples/config_build"
|
||||
|
||||
// Values
|
||||
|
||||
// Errors
|
||||
|
||||
// Types and methods
|
||||
|
||||
// Type aliases
|
||||
|
||||
// Traits
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
// Generated using `moon info`, DON'T EDIT IT
|
||||
package "Nanaloveyuki/BitLogger/examples/console_basic"
|
||||
|
||||
// Values
|
||||
|
||||
// Errors
|
||||
|
||||
// Types and methods
|
||||
|
||||
// Type aliases
|
||||
|
||||
// Traits
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
// Generated using `moon info`, DON'T EDIT IT
|
||||
package "Nanaloveyuki/BitLogger/examples/file_rotation"
|
||||
|
||||
// Values
|
||||
|
||||
// Errors
|
||||
|
||||
// Types and methods
|
||||
|
||||
// Type aliases
|
||||
|
||||
// Traits
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
// Generated using `moon info`, DON'T EDIT IT
|
||||
package "Nanaloveyuki/BitLogger/examples/presets"
|
||||
|
||||
// Values
|
||||
|
||||
// Errors
|
||||
|
||||
// Types and methods
|
||||
|
||||
// Type aliases
|
||||
|
||||
// Traits
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
// Generated using `moon info`, DON'T EDIT IT
|
||||
package "Nanaloveyuki/BitLogger/examples/style_tags"
|
||||
|
||||
// Values
|
||||
|
||||
// Errors
|
||||
|
||||
// Types and methods
|
||||
|
||||
// Type aliases
|
||||
|
||||
// Traits
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
// Generated using `moon info`, DON'T EDIT IT
|
||||
package "Nanaloveyuki/BitLogger/examples/text_formatter"
|
||||
|
||||
// Values
|
||||
|
||||
// Errors
|
||||
|
||||
// Types and methods
|
||||
|
||||
// Type aliases
|
||||
|
||||
// Traits
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
// Generated using `moon info`, DON'T EDIT IT
|
||||
package "Nanaloveyuki/BitLogger/src-async/utils"
|
||||
|
||||
import {
|
||||
"Nanaloveyuki/BitLogger/src/config_model",
|
||||
"maria/json_parser",
|
||||
}
|
||||
|
||||
// Values
|
||||
pub fn async_logger_build_config_to_json(AsyncLoggerBuildConfig) -> @json_parser.JsonValue
|
||||
|
||||
pub fn async_logger_config_to_json(AsyncLoggerConfig) -> @json_parser.JsonValue
|
||||
|
||||
pub fn async_logger_state_to_json(AsyncLoggerState) -> @json_parser.JsonValue
|
||||
|
||||
pub fn async_runtime_mode_label(AsyncRuntimeMode) -> String
|
||||
|
||||
pub fn async_runtime_state_to_json(AsyncRuntimeState) -> @json_parser.JsonValue
|
||||
|
||||
pub fn compatibility_async_runtime_mode() -> AsyncRuntimeMode
|
||||
|
||||
pub fn native_worker_async_runtime_mode() -> AsyncRuntimeMode
|
||||
|
||||
pub fn parse_async_logger_build_config_text(String) -> AsyncLoggerBuildConfig raise
|
||||
|
||||
pub fn parse_async_logger_config_text(String) -> AsyncLoggerConfig raise
|
||||
|
||||
pub fn stringify_async_logger_build_config(AsyncLoggerBuildConfig, pretty? : Bool) -> String
|
||||
|
||||
pub fn stringify_async_logger_config(AsyncLoggerConfig, pretty? : Bool) -> String
|
||||
|
||||
pub fn stringify_async_logger_state(AsyncLoggerState, pretty? : Bool) -> String
|
||||
|
||||
pub fn stringify_async_runtime_state(AsyncRuntimeState, pretty? : Bool) -> String
|
||||
|
||||
// Errors
|
||||
|
||||
// Types and methods
|
||||
pub(all) enum AsyncFlushPolicy {
|
||||
Never
|
||||
Batch
|
||||
Shutdown
|
||||
}
|
||||
|
||||
pub(all) enum AsyncLifecyclePhase {
|
||||
Ready
|
||||
Running
|
||||
Failed
|
||||
Closing
|
||||
Closed
|
||||
ClosedFailed
|
||||
}
|
||||
|
||||
pub struct AsyncLoggerBuildConfig {
|
||||
logger : @config_model.LoggerConfig
|
||||
async_config : AsyncLoggerConfig
|
||||
}
|
||||
pub fn AsyncLoggerBuildConfig::new(logger? : @config_model.LoggerConfig, async_config? : AsyncLoggerConfig) -> Self
|
||||
|
||||
pub struct AsyncLoggerConfig {
|
||||
max_pending : Int
|
||||
overflow : AsyncOverflowPolicy
|
||||
max_batch : Int
|
||||
linger_ms : Int
|
||||
flush : AsyncFlushPolicy
|
||||
}
|
||||
pub fn AsyncLoggerConfig::new(max_pending? : Int, overflow? : AsyncOverflowPolicy, max_batch? : Int, linger_ms? : Int, flush? : AsyncFlushPolicy) -> Self
|
||||
|
||||
pub struct AsyncLoggerState {
|
||||
runtime : AsyncRuntimeState
|
||||
phase : AsyncLifecyclePhase
|
||||
pending_count : Int
|
||||
dropped_count : Int
|
||||
is_closed : Bool
|
||||
is_running : Bool
|
||||
has_failed : Bool
|
||||
backlog_retained : Bool
|
||||
can_rerun : Bool
|
||||
terminal : Bool
|
||||
last_error : String
|
||||
flush_policy : AsyncFlushPolicy
|
||||
}
|
||||
pub fn AsyncLoggerState::new(AsyncRuntimeState, AsyncLifecyclePhase, Int, Int, String, AsyncFlushPolicy) -> Self
|
||||
|
||||
pub(all) enum AsyncOverflowPolicy {
|
||||
Blocking
|
||||
DropOldest
|
||||
DropNewest
|
||||
}
|
||||
|
||||
pub enum AsyncRuntimeMode {
|
||||
NativeWorker
|
||||
Compatibility
|
||||
}
|
||||
|
||||
pub struct AsyncRuntimeState {
|
||||
mode : AsyncRuntimeMode
|
||||
background_worker : Bool
|
||||
}
|
||||
pub fn AsyncRuntimeState::new(AsyncRuntimeMode, Bool) -> Self
|
||||
|
||||
// Type aliases
|
||||
|
||||
// Traits
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
// Generated using `moon info`, DON'T EDIT IT
|
||||
package "Nanaloveyuki/BitLogger/src/core"
|
||||
|
||||
// Values
|
||||
pub fn field(String, String) -> Field
|
||||
|
||||
pub fn fields(Array[(String, String)]) -> Array[Field]
|
||||
|
||||
// Errors
|
||||
|
||||
// Types and methods
|
||||
pub struct Field {
|
||||
key : String
|
||||
value : String
|
||||
}
|
||||
pub fn Field::with_value(Self, String) -> Self
|
||||
|
||||
pub(all) enum Level {
|
||||
Trace
|
||||
Debug
|
||||
Info
|
||||
Warn
|
||||
Error
|
||||
}
|
||||
pub fn Level::enabled(Self, Self) -> Bool
|
||||
pub fn Level::label(Self) -> String
|
||||
pub fn Level::priority(Self) -> Int
|
||||
|
||||
pub struct Record {
|
||||
level : Level
|
||||
timestamp_ms : UInt64
|
||||
target : String
|
||||
message : String
|
||||
fields : Array[Field]
|
||||
}
|
||||
pub fn Record::copy(Self) -> Self
|
||||
pub fn Record::new(Level, String, timestamp_ms? : UInt64, target? : String, fields? : Array[Field]) -> Self
|
||||
pub fn Record::with_fields(Self, Array[Field]) -> Self
|
||||
pub fn Record::with_message(Self, String) -> Self
|
||||
pub fn Record::with_target(Self, String) -> Self
|
||||
|
||||
// Type aliases
|
||||
|
||||
// Traits
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
// Generated using `moon info`, DON'T EDIT IT
|
||||
package "Nanaloveyuki/BitLogger/src/utils"
|
||||
|
||||
import {
|
||||
"Nanaloveyuki/BitLogger/src/core",
|
||||
"Nanaloveyuki/BitLogger/src/formatting",
|
||||
}
|
||||
|
||||
// Values
|
||||
pub fn all_of(Array[(@core.Record) -> Bool]) -> (@core.Record) -> Bool
|
||||
|
||||
pub fn any_of(Array[(@core.Record) -> Bool]) -> (@core.Record) -> Bool
|
||||
|
||||
pub fn append_fields(Array[@core.Field]) -> (@core.Record) -> @core.Record
|
||||
|
||||
pub fn close_file_handle_internal(FileHandle) -> Bool
|
||||
|
||||
pub fn color_mode_label(@formatting.ColorMode) -> String
|
||||
|
||||
pub fn color_support_label(@formatting.ColorSupport) -> String
|
||||
|
||||
pub fn compose_patches(Array[(@core.Record) -> @core.Record]) -> (@core.Record) -> @core.Record
|
||||
|
||||
pub fn default_style_tag_registry() -> @formatting.StyleTagRegistry
|
||||
|
||||
pub fn field_equals(String, String) -> (@core.Record) -> Bool
|
||||
|
||||
pub fn file_size_i64_internal(FileHandle) -> Int64
|
||||
|
||||
pub fn flush_file_handle_internal(FileHandle) -> Bool
|
||||
|
||||
pub fn format_json(@core.Record) -> String
|
||||
|
||||
pub fn format_text(@core.Record, formatter? : @formatting.TextFormatter) -> String
|
||||
|
||||
pub fn global_style_tag_registry() -> @formatting.StyleTagRegistry
|
||||
|
||||
pub fn has_field(String) -> (@core.Record) -> Bool
|
||||
|
||||
pub fn identity_patch() -> (@core.Record) -> @core.Record
|
||||
|
||||
pub fn level_at_least(@core.Level) -> (@core.Record) -> Bool
|
||||
|
||||
pub fn message_contains(String) -> (@core.Record) -> Bool
|
||||
|
||||
pub fn native_files_supported_internal() -> Bool
|
||||
|
||||
pub fn not_((@core.Record) -> Bool) -> (@core.Record) -> Bool
|
||||
|
||||
pub fn open_file_handle_internal(String, Bool) -> FileHandle?
|
||||
|
||||
pub fn prefix_message(String) -> (@core.Record) -> @core.Record
|
||||
|
||||
pub fn redact_field(String, placeholder? : String) -> (@core.Record) -> @core.Record
|
||||
|
||||
pub fn redact_fields(Array[String], placeholder? : String) -> (@core.Record) -> @core.Record
|
||||
|
||||
pub fn remove_file_internal(String) -> Bool
|
||||
|
||||
pub fn rename_file_internal(String, String) -> Bool
|
||||
|
||||
pub fn reset_global_style_tag_registry() -> Unit
|
||||
|
||||
pub fn set_global_style_tag_registry(@formatting.StyleTagRegistry) -> Unit
|
||||
|
||||
pub fn set_target(String) -> (@core.Record) -> @core.Record
|
||||
|
||||
pub fn string_byte_length_internal(String) -> Int
|
||||
|
||||
pub fn style_markup_mode_label(@formatting.StyleMarkupMode) -> String
|
||||
|
||||
pub fn style_tag_registry() -> @formatting.StyleTagRegistry
|
||||
|
||||
pub fn target_has_prefix(String) -> (@core.Record) -> Bool
|
||||
|
||||
pub fn target_is(String) -> (@core.Record) -> Bool
|
||||
|
||||
pub fn text_formatter(show_timestamp? : Bool, show_level? : Bool, show_target? : Bool, show_fields? : Bool, separator? : String, field_separator? : String, template? : String, color_mode? : @formatting.ColorMode, color_support? : @formatting.ColorSupport, style_markup? : @formatting.StyleMarkupMode, target_style_markup? : @formatting.StyleMarkupMode, fields_style_markup? : @formatting.StyleMarkupMode, style_tags? : @formatting.StyleTagRegistry?) -> @formatting.TextFormatter
|
||||
|
||||
pub fn text_style(fg? : String?, bg? : String?, bold? : Bool, dim? : Bool, italic? : Bool, underline? : Bool) -> @formatting.TextStyle
|
||||
|
||||
pub fn write_file_handle_internal(FileHandle, String) -> Bool
|
||||
|
||||
// Errors
|
||||
|
||||
// Types and methods
|
||||
pub struct FileHandle {
|
||||
path : String
|
||||
}
|
||||
|
||||
// Type aliases
|
||||
pub using @formatting {type ColorMode}
|
||||
|
||||
pub using @formatting {type ColorSupport}
|
||||
|
||||
pub type RecordFormatter = (@core.Record) -> String
|
||||
|
||||
pub type RecordPatch = (@core.Record) -> @core.Record
|
||||
|
||||
pub type RecordPredicate = (@core.Record) -> Bool
|
||||
|
||||
pub using @formatting {type StyleMarkupMode}
|
||||
|
||||
pub using @formatting {type StyleTagRegistry}
|
||||
|
||||
pub using @formatting {type TextFormatter}
|
||||
|
||||
pub using @formatting {type TextStyle}
|
||||
|
||||
// Traits
|
||||
|
||||
Reference in New Issue
Block a user