e3.1.2 Changed output stdout to console for clarity.
This commit is contained in:
@ -286,7 +286,7 @@ builder := compat.NewBuilder().
|
||||
"format=txt", // Human-readable
|
||||
"level=-4", // Debug level
|
||||
"trace_depth=3", // Include traces
|
||||
"enable_stdout=true", // Console output
|
||||
"enable_console=true", // Console output
|
||||
"flush_interval_ms=50", // Quick feedback
|
||||
)
|
||||
```
|
||||
@ -297,7 +297,7 @@ builder := compat.NewBuilder().
|
||||
builder := compat.NewBuilder().
|
||||
WithOptions(
|
||||
"disable_file=true", // No files
|
||||
"enable_stdout=true", // Console only
|
||||
"enable_console=true", // Console only
|
||||
"format=json", // For aggregators
|
||||
"level=0", // Info and above
|
||||
)
|
||||
|
||||
@ -28,7 +28,7 @@ All builder methods return `*ConfigBuilder` for chaining. Errors are accumulated
|
||||
| `Format(format string)` | `format`: Output format | Sets format ("txt", "json", "raw") |
|
||||
| `BufferSize(size int64)` | `size`: Buffer size | Sets channel buffer size |
|
||||
| `MaxSizeKB(size int64)` | `size`: Size in MB | Sets max file size |
|
||||
| `EnableStdout(enable bool)` | `enable`: Boolean | Enables console output |
|
||||
| `EnableConsole(enable bool)` | `enable`: Boolean | Enables console output |
|
||||
| `DisableFile(disable bool)` | `disable`: Boolean | Disables file output |
|
||||
| `HeartbeatLevel(level int64)` | `level`: 0-3 | Sets monitoring level |
|
||||
|
||||
|
||||
@ -60,11 +60,11 @@ logger.Info("info txt log record written to /var/log/myapp.txt")
|
||||
|-----------|------|-------------|---------|
|
||||
| `show_timestamp` | `bool` | Include timestamps in log entries | `true` |
|
||||
| `show_level` | `bool` | Include log level in entries | `true` |
|
||||
| `enable_stdout` | `bool` | Mirror logs to stdout/stderr | `false` |
|
||||
| `stdout_target` | `string` | Console target: `"stdout"`, `"stderr"`, or `"split"` | `"stdout"` |
|
||||
| `enable_console` | `bool` | Mirror logs to stdout/stderr | `false` |
|
||||
| `console_target` | `string` | Console target: `"stdout"`, `"stderr"`, or `"split"` | `"stdout"` |
|
||||
| `disable_file` | `bool` | Disable file output (console-only) | `false` |
|
||||
|
||||
**Note:** When `stdout_target="split"`, INFO/DEBUG logs go to stdout while WARN/ERROR logs go to stderr.
|
||||
**Note:** When `console_target="split"`, INFO/DEBUG logs go to stdout while WARN/ERROR logs go to stderr.
|
||||
|
||||
### Performance Tuning
|
||||
|
||||
|
||||
Reference in New Issue
Block a user