Genesys Administrator tracing can be enabled by changing the following in the <log4net> section (of Web.Config):
<log4net>
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
<file value="logfile"/>
<appendToFile value="true"/>
<rollingStyle value="Composite"/>
<datePattern value="yyyyMMdd"/>
<!-- gst: append following to add .txt to file name: .\\tx\\t -->
<maxSizeRollBackups value="10"/>
<maximumFileSize value="1MB"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline"/>
</layout>
</appender>
<!-- gst added -->
<appender name="TraceAppender" type="log4net.Appender.TraceAppender">
<layout type="log4net.Layout.PatternLayout">
<!--ConversionPattern value="%d [%t] %-5p %c - %m [%P{InstanceId}]%n" / -->
<ConversionPattern value="%message%newline"/>
</layout>
</appender>
<root>
<level value="INFO"/>
<!-- appender-ref ref="RollingLogFileAppender"/ -->
<appender-ref ref="TraceAppender"/>
</root>
to:
<log4net><appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
<file value="galog.log"/>
<appendToFile value="true"/>
<rollingStyle value="Composite"/>
<datePattern value="yyyyMMdd"/>
<!-- gst: append following to add .txt to file name: .\\tx\\t -->
<maxSizeRollBackups value="10"/>
<maximumFileSize value="1MB"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline"/>
</layout>
</appender>
<!-- gst added -->
<appender name="TraceAppender" type="log4net.Appender.TraceAppender">
<layout type="log4net.Layout.PatternLayout">
<!--ConversionPattern value="%d [%t] %-5p %c - %m [%P{InstanceId}]%n" / -->
<ConversionPattern value="%message%newline"/>
</layout>
</appender>
<root>
<level value="DEBUG"/>
<appender-ref ref="RollingLogFileAppender"/>
<appender-ref ref="TraceAppender"/>
</root>
For the above changes to take effect, you need to logout and login. You can now see file “galog.log” will be created in the same installation path as Genesys Administrator
Do you know how to get the log files to appear in another direcotry?
ReplyDeleteYes, instead of "galog.log" in the configuration file, provide full path like "C:\logs\galog.log". FYI, this blog is now moved to www.lakshmikanth.com and request you to visit the site for more tips & articles.
DeleteThanks. I have set this up, but when the date is appended, it is appended after the ".log". I get filenames like "logfile.log20151222". What I was it "logfile20151222.log". How do I get the ".log" to be appended after the date in the filename?
Delete