v1.4.0
Improvements in Goxe v1.4.0
Section titled “Improvements in Goxe v1.4.0”This update focuses on stability and technical refinement. We have fixed bugs in data persistence during process termination and restructured the application core to facilitate future expansions, significantly improving internal documentation and file handling.
Featured Changes
Section titled “Featured Changes”- Persistence Fix: A bug causing data loss upon process termination has been resolved. The shutdown logic now ensures that all data in transit is processed and remote delivery is securely completed before exiting.
- File Normalization: A new file normalization flow is introduced, toggleable via a command-line flag. This feature standardizes file creation and cleanup, ensuring a predictable working environment.
- Core Refactoring: We have modularized the main logic and flag handling in
main.go. This results in cleaner code, a slightly faster startup, and a more maintainable architecture. - Documentation and Guides: Contribution guides (
CONTRIBUTING.md) have been implemented and core function documentation has been standardized, facilitating repository collaboration. - Experience Improvements (UX): The update notification text is now more descriptive, explicitly including the
goxe updatecommand to simplify the process for the user.
Static Log Analysis (-brew)
Section titled “Static Log Analysis (-brew)”The new -brew flag allows for processing historical log files generated externally or prior to the Goxe installation. it is an independent feature designed for those who need to normalize old reports, reduce the disk space these files occupy through clustering, and send those metrics to their remote server in one go.
What exactly happens when executed?
- Reading and Clustering: The engine uses a
bufio.Scannerfor efficient file reading. Each line is processed throughcluster.Clusterto group similar messages and sanitize content, utilizingunsafeconversions to maximize speed without overloading memory. - Statistics Generation: For each pattern found, Goxe calculates the frequency of occurrence (
Count), identifies the log level (Level), and records the timestamps of the first and last time said pattern was detected. - Output and Results:
- Local Report: Upon reaching the end of the file (EOF), the
FileReadercomponent automatically generates a report on disk with the processed results, facilitating subsequent reading. - Remote Delivery: In parallel, the
ShipLogsfunction synchronizes the entire map of collected statistics with your remote server.
- Local Report: Upon reaching the end of the file (EOF), the
- Memory Cleanup: Once the export is finished, the log map is released via the
clear()function to ensure no residues remain in the system.
Execution command:
goxe -brew /path/to/file.log idLogUpon completing the analysis, the system will confirm the save path: [System] Goxe: Normalization complete. Saved as ..., and the report will be available both locally and on your remote server.