Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何配置运行日志保留天数? #23

Open
BingboLI opened this issue Nov 7, 2022 · 5 comments
Open

如何配置运行日志保留天数? #23

BingboLI opened this issue Nov 7, 2022 · 5 comments

Comments

@BingboLI
Copy link

BingboLI commented Nov 7, 2022

现在运行日志默认只保存3天,但是我想根据不同的job配置不同保存天数,请问如何配置?

@BingboLI
Copy link
Author

BingboLI commented Nov 7, 2022

如果不能为每个job配置保存天数,是否可以延长保存天数呢?
我在hangfire代码里看到exprire这个属性,它代表保存几天日志。
我们项目中有每分钟执行和每天执行两类job,我们希望每分钟执行的job日志保存时间短,而每天执行的job日志可以长期保存

@gnsilence
Copy link
Owner

如果不能为每个job配置保存天数,是否可以延长保存天数呢? 我在hangfire代码里看到exprire这个属性,它代表保存几天日志。 我们项目中有每分钟执行和每天执行两类job,我们希望每分钟执行的job日志保存时间短,而每天执行的job日志可以长期保存

image
你说的是这个吗,目前过期时间是全局统一设置的

@gnsilence
Copy link
Owner

现在运行日志默认只保存3天,但是我想根据不同的job配置不同保存天数,请问如何配置?

针对每个作业设置过期时常应该也很容易实现,回头我加了测试下

@BingboLI
Copy link
Author

BingboLI commented Nov 7, 2022

非常感谢

@BingboLI
Copy link
Author

BingboLI commented Feb 1, 2023

您好,这个功能您添加了吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants