dpj0015 2017-01-17 09:58
浏览 50
已采纳

如何设置服务器提供的目录的记录器输出路径?

I have a symfony 3.2 project and want to log to a configurable directory. This directory is configured as a registry key in the Windows Registry (I cannot change that).

So I have built a service that reads the log path from the registry key, and now want to log to that path. This service does not need a logger, of course :-)

How can I do that?

  • 写回答

2条回答 默认 最新

  • dscw1223 2017-01-17 10:26
    关注

    It actually depends on how and what you want to log.

    Generally speaking, if you want to define another path for the logging of your application, your best bet is to do in the AppKernel.php

    Nothing prevent you to override this method in your own AppKernel and use PHP code to fetch the path in the Windows Registry, no need for a Symfony service.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 QT6颜色选择对话框显示不完整
  • ¥20 能提供一下思路或者代码吗
  • ¥15 用twincat控制!
  • ¥15 请问一下这个运行结果是怎么来的
  • ¥15 单通道放大电路的工作原理
  • ¥30 YOLO检测微调结果p为1
  • ¥15 DS18B20内部ADC模数转换器
  • ¥15 做个有关计算的小程序
  • ¥15 如何用MATLAB实现以下三个公式(有相互嵌套)
  • ¥30 关于#算法#的问题:运用EViews第九版本进行一系列计量经济学的时间数列数据回归分析预测问题 求各位帮我解答一下