Commit graph

6 commits

Author SHA1 Message Date
0fae461408
Implement Ruleset configuration in logranger
Added a Ruleset configuration to the logranger application, along with associated error handling. The code now loads a ruleset file from configuration, checks for duplicate rules, and logs each rule as it is found. The ruleset is also integrated within the server setup. The PIDFile now includes a default RuleFile reference in config.go.
2023-12-22 17:31:41 +01:00
f02d5be680
Update 'parser' struct annotation in config.go
The 'parser' struct in config.go has been updated with Fig configuration annotation. This allows ease of configuration as it sources the configuration options from the environment, making the code cleaner and more flexible.
2023-12-22 16:08:54 +01:00
830de14890
Update go-parsesyslog dependency and refine server connection handling
This update upgrades the go-parsesyslog dependency version to v0.2.2. It also enhances the server's connection handling. This is done by expanding the `HandleConnection` method to handle network errors and EOF scenarios more thoroughly, adjusting processing time measurements, and handling deadlines for connection processing. Furthermore, the initialization of the syslog parser has now been moved to the `NewServer` function for efficiency.
2023-12-22 15:24:58 +01:00
c9c3bf31da
Refactor documentation and methods in server-related files
The documentation for some methods in the server-related files (config.go, server.go, and listener.go) has been updated to provide more accurate and descriptive explanations of their functionality. Additionally, the New methods for Config and Server objects have been changed to reflect that they create instances of these objects. Some method functionalities like 'setLogLevel' in server.go have been extended for more accurate operation based on the config log level.
2023-12-19 20:17:56 +01:00
ea1ac393bc
Add SPDX license identifiers and update copyright year
All source code files as well as README.md, .gitignore, and various configuration files have been updated with an SPDX license identifier, changing license from CC0-1.0 to MIT. The copyright year has been updated to 2023, and the copyright holder's email address has been corrected from 'winni@neessen.dev' to 'wn@neessen.dev'. An MIT license text file has been additionally added.
2023-12-15 16:35:41 +01:00
cf17cc3419
Add initial server implementation with config loading and listener setup
This commit introduces the creation of the core server and its components: config loading mechanism, listener setup, and error handling. The provided configuration allows the server to run different types of listeners. Additionally, it includes robust log-level settings to facilitate debugging and operational transparency.
2023-12-14 12:09:01 +01:00