ursaserver / ursa

Rate Limiter Reverse Proxy
MIT License
0 stars 0 forks source link

setup logging #8

Open sumanchapai opened 9 months ago

sumanchapai commented 7 months ago

See 1a2b159

sumanchapai commented 7 months ago

It has been hard find information on how best to handle logs emitted. A lot of discussion seems to be concerned on how fast the log is written whether it's structured in any way or not. Therefore are are a plethora of go logging libraries, using slog which is part of the standard library since recently and the "blazing fast" zap. There have been some discussions on handing the log (like writing to a different logfile every day/month, max size, etc. etc. all of which are features that are available in Java's log4j for apache?):

https://www.reddit.com/r/golang/comments/8afvzu/is_there_fullfledge_log_library_similar_to_javas/ \ https://12factor.net/logs \ https://www.reddit.com/r/golang/comments/15ndgdy/slog_splitting_stdoutstderr_streams/