mirror of
https://github.com/2dust/v2rayN.git
synced 2026-02-28 13:13:04 +00:00
28 lines
843 B
C#
28 lines
843 B
C#
namespace ServiceLib.Services.CoreConfig;
|
|
|
|
public partial class CoreConfigV2rayService
|
|
{
|
|
private void GenLog()
|
|
{
|
|
try
|
|
{
|
|
if (_config.CoreBasicItem.LogEnabled)
|
|
{
|
|
var dtNow = DateTime.Now;
|
|
_coreConfig.log.loglevel = _config.CoreBasicItem.Loglevel;
|
|
_coreConfig.log.access = Utils.GetLogPath($"Vaccess_{dtNow:yyyy-MM-dd}.txt");
|
|
_coreConfig.log.error = Utils.GetLogPath($"Verror_{dtNow:yyyy-MM-dd}.txt");
|
|
}
|
|
else
|
|
{
|
|
_coreConfig.log.loglevel = _config.CoreBasicItem.Loglevel;
|
|
_coreConfig.log.access = null;
|
|
_coreConfig.log.error = null;
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
Logging.SaveLog(_tag, ex);
|
|
}
|
|
}
|
|
}
|