转储Windows服务日志文件的文件夹 [英] Folder to dump windows service log files

查看:167
本文介绍了转储Windows服务日志文件的文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

简短:Windows服务将日志文件转储到哪个文件夹最合适?



详细信息 / p>

我有一个Windows服务,生成一个低技术最终用户可能感兴趣的日志文件(计算机和生产线监控传感器之间的实际通信)。



计算机是独立的专用计算机,充当数据采集服务器,它具有监视器并可由最终用户访问,但不意味着被触摸,除非有是有问题的。



输出这些日志文件的最佳(最合适的)地方(文件夹)是什么?



我的注意事项是:


  1. 易于配置(如果我必须访问该文件夹的本地服务帐户) li>
  2. 最终用户的访问方便(再次:他们不需要,但偶尔也可能需要)。

编辑:它创建大约10到1Mb的滚动大小的文件。大小没有问题,所以不需要压缩和清理。

解决方案

我的偏好是使用所有用户文件夹结构。通过在其中创建与您的服务应用程序相同名称的文件夹,很容易显示内容的来源,您可以授予访问权限,而不会影响程序文件文件夹,当您卸载或升级应用程序时,您将不会离开程序文件中的孤立文件夹无法删除,因为安装程序不知道它不得不删除一些日志文件。


Short: What's the most appropriate folder for windows service to dump log files into?

Details

I have a windows service that produces log files that a low-tech end user might be interested to look at (actual communication between a computer and a manufacturing line monitoring sensors).

The computer is a stand-alone dedicated computer that acts as a data acquisition server, it has monitor and accessible to the end user, but not meant to be touched unless there are problems.

What's the best (most appropriate) place (folder) to output those log files to?

My considerations are:

  1. ease of configuration (in case I have to give an access for local services account to that folder).
  2. ease of access for an end user (again: they shouldn't need to, but occasionally they might want to).

EDIT: It creates about 10 up to 1Mb rolling size files. There is no issue with size, so no compression and clean-up is necessary.

解决方案

My preference is to make use of the All Users folder structure. By creating a folder in there with the same name as your service app, it's readily apparent where the contents come from, you can grant access to it without compromising the Program Files folder, and when you uninstall or upgrade your app you won't leave 'orphan' folders in Program Files that couldn't be removed because the installer didn't know it had to delete some log files.

这篇关于转储Windows服务日志文件的文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆