Plugin logger is not write to a separate file

Dipod
Dipod
edited December 2021 in Photon Server

Hi, I use self-hosted photon server v5 and trying to config my plugin to write log in separate file.

I'm use this manual.

https://doc.photonengine.com/en-US/server/current/plugins/manual#logging

Added snippet from it in file \deploy\LoadBalancing\GameServer\bin\log4net.config

I'm restarted server, Plugins.log appeared in log folder, but all plugin logs anyway write in GSgame.log

Can you help me?

Best Answer

  • chvetsov
    chvetsov mod
    Answer ✓

    hi, @Dipod.

    I assume that you are using new way of logging by creating loggers. the new loggers have prefix "Plugin"

    than you have to add extra logger configuration:

      <logger name="Plugin" additivity="false">
        <level value="INFO" />
        <appender-ref ref="PluginLogFileAppender" />
      </logger>
    

    best,

    ilya

Answers

  • chvetsov
    chvetsov mod
    Answer ✓

    hi, @Dipod.

    I assume that you are using new way of logging by creating loggers. the new loggers have prefix "Plugin"

    than you have to add extra logger configuration:

      <logger name="Plugin" additivity="false">
        <level value="INFO" />
        <appender-ref ref="PluginLogFileAppender" />
      </logger>
    

    best,

    ilya

  • Yes, now it works! Thank you! Can you update documentation snippet?

  • sure

    best,

    ilya