diff options
| author | mhsanaei <ho3ein.sanaei@gmail.com> | 2025-09-20 10:35:50 +0300 |
|---|---|---|
| committer | mhsanaei <ho3ein.sanaei@gmail.com> | 2025-09-20 10:35:50 +0300 |
| commit | 6ced549deaecb42b9bb93ea9efcb4c1bbaabe8a4 (patch) | |
| tree | 28d8d82530476cf607e4d05ca189ae05868711e6 /xray/log_writer.go | |
| parent | f60682a6b7cb749fee403c84e2587c3ad7e7ced0 (diff) | |
docs: add comments for all functions
Diffstat (limited to 'xray/log_writer.go')
| -rw-r--r-- | xray/log_writer.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/xray/log_writer.go b/xray/log_writer.go index 3be39b3e..b2b3b04a 100644 --- a/xray/log_writer.go +++ b/xray/log_writer.go @@ -8,14 +8,17 @@ import ( "github.com/mhsanaei/3x-ui/v2/logger" ) +// NewLogWriter returns a new LogWriter for processing Xray log output. func NewLogWriter() *LogWriter { return &LogWriter{} } +// LogWriter processes and filters log output from the Xray process, handling crash detection and message filtering. type LogWriter struct { lastLine string } +// Write processes and filters log output from the Xray process, handling crash detection and message filtering. func (lw *LogWriter) Write(m []byte) (n int, err error) { crashRegex := regexp.MustCompile(`(?i)(panic|exception|stack trace|fatal error)`) |
