Logging

HI!

I cant out my message into log file.

1. I modify constructor WebHooksPlugin (example plugin with sdk)
public WebHooksPlugin()
{
this.UseStrictMode = true;

this.PluginHost.LogDebug("HEllo!!!!!!");
this.PluginHost.LogInfo("H123Ello!!!!!!");
}

2. Add to log4net.config file



















File PluginsTest.log automaticaly create, but it is empty... What do I doing wrong?

Comments

  • 2. Add to log4net.config file *
    [appender name="PluginLogFileAppender" type="log4net.Appender.RollingFileAppender">
    [file type="log4net.Util.PatternString" value="%property{Photon:ApplicationLogPath}\\PluginsTest.log" />
    [param name="AppendToFile" value="true" />
    [param name="MaxSizeRollBackups" value="20" />
    [param name="MaximumFileSize" value="10MB" />
    [param name="RollingStyle" value="Size" />
    [param name="LockingModel" type="log4net.Appender.FileAppender+MinimalLock" />
    [layout type="log4net.Layout.PatternLayout">
    [param name="ConversionPattern" value="%d [%t] %-5p %c - %m%n" />
    [/layout>
    [/appender>


    [logger name="Photon.Hive.Plugin.WebHooks.WebHooksPlugin">
    [level value="DEBUG" />
    [appender-ref ref="PluginLogFileAppender" />
    [/logger>
  • Hi, @FrostFT

    Please use 'Photon.Hive.HiveGame.HiveHostGame.Plugin' logger name to configure your log

    best,
    ilya
Sign In or Register to comment.