将滚动文件移至另一个文件夹
是否可以将旧文件移至其他文件夹?我将其设置为每天滚动,我想将当前的登录列入一个文件夹和较旧的日志中,以便更容易找到最新的文件。至少我希望最新的文件始终是同一名称,并且只有较旧的日志才能将日期添加到文件名中。
例如,当前文件应命名为log.txt和log log20220403.txt。我需要这个,因为我必须从命令行访问日志并拥有常数文件名可以简化很多内容。
Is it possible to move old files to some other folder? I have it set up to roll every day and I want to have current log in one folder and older logs from previous days in sub-folder so that it is easier to find the latest file. At the very least I would want the latest file to always be the same name, and only older logs should have date added to file name.
E.g., current file should be named log.txt and log from yesterday - log20220403.txt. I need this because I have to access logs from command line and having constant file name simplifies things a lot.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论