Znode Logging Methods

Introduction

The ZnodeLogging.LogMessage() is the standard way we log and the standard way we encourage you to log. By using the custom methods we wrote, these methods wrap log4net

  • Apache log4net library is a tool we use to help output log statements

  • The methods do all the delegating and heavy lifting out to the log4net and you can reference the log4.net configs to see what going on behind the scenes  

  • In the Source or SDK, you can reference the following path for log4net ZnodeMultifront/Projects/Znode.Engine.Api/log4net.config

  • This is run at runtime by log4net

  • You can configure what appenders are active, the default is the MongoDBAppender

    • <appender name='BufferingForwardingAppender' type='log4net.Appender.BufferingForwardingAppender'>
          <bufferSize value = '100'/>
          <!-- Can add multiple appender-ref to log in batch-->
          <appender-ref ref='MongoDBAppender'/>
        </appender>

  • Logs that are being logged in the code are being appended to different dependencies such as MongoDB. In the example above, it shows as its buffering it in memory
  • This can be configured to use any logging framework of your choice, if you choose not to use the OOTB configuration as MongoDB or if you want to additionally log to another application alongside MongoDB (SQL, file on Disk, Stackify, or another cloud-based solution

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.