apache / incubator-pegasus

Apache Pegasus - A horizontally scalable, strongly consistent and high-performance key-value store
https://pegasus.apache.org/
Apache License 2.0
1.96k stars 310 forks source link

feat: Distinguish log file names #2010

Closed acelyc111 closed 1 month ago

acelyc111 commented 1 month ago

This patch fills the log file name with the role name. For example, the replica server log file name is in the form of replica.log.<yyyyMMdd_hhmmss_SSS>, while the meta server log file name is in the form of meta.log.<yyyyMMdd_hhmmss_SSS>.

If the role name is empty (typically in unit tests), it will fall back to use a new configudation base_name in tools.simple_logger section, it's default as pegasus. Then, the log file is in the form of pegasus.log.<yyyyMMdd_hhmmss_SSS>.

[tools.simple_logger]
+base_name = pegasus