The Embotics® vCommander® Windows service logs a great deal of information, which is typically used when interacting with Embotics’ technical support. An easy way to submit logs to the technical support team is to run the Embotics vCommander diagnostics


Manually Managing Logging Level


You can also set DEBUG logging manually for individual components in the interest of keeping the log files current, and at a manageable size. 


1. On the Embotics vCommander application server, open the referenced file path

    a. Application Logging: C:\Program Files\Embotics\vCommander\tomcat\common\classes\log4j2.xml)

    b. Authentication Logging: C:\Program Files\Embotics\vCommander\identityservice\config\log4j2.xml

2. For existing loggers change the level from INFO to ERROR or DEBUG: 

    <Logger level="INFO" name="rest.security.jwt"/>

3. To Enable a logger that has been commented out (in XML, the <!--  --> are comments). Simply move the <Logger tag outside the bottom `-->`


DISABLED

<!--

           #############
## Billing Records
#############
<Logger level="DEBUG" name="billingrecords"/>

-->


ENABLED
<!--
#############
## Billing Records
#############
-->
           <Logger level="DEBUG" name="billingrecords"/>





Enabling AD / Active Directory logging:

<Install Dir>\Embotics\vCommander\identityservice\config\log4j2.xml


       <Logger name="embotics.identityservice.service.security.userdirectory" level="DEBUG"/>

       <Logger name="AccountManager.Persister" level="DEBUG"/>

       <Logger name="identityservice" level="DEBUG"/>



Enabling Billing Records logging:


<install Dir>\Embotics\vCommander\tomcat\common\classes\log4j2.xml

 

<Logger name="billingrecords.generation" level="TRACE” /> (TRACE provides more details)

<Logger name="billingrecords.persistence" level="DEBUG” />

<Logger name="billingrecords.uptime" level=" DEBUG” />



Enabling Service Costs (Cost Analytics View) logging:


<install Dir>\Embotics\vCommander\tomcat\common\classes\log4j2.xml


<Logger name="servicecost.retrieval " level="DEBUG” />

<Logger name="servicecost.persistence" level="DEBUG” />

<Logger name=" servicecost.aggregator " level="DEBUG” />

<Logger name=" servicecost.eventprocessor " level="DEBUG” />

<Logger name=" servicecost.budgetalertmanager " level="DEBUG” />

<Logger name=" servicecost.budgetmanager" level="DEBUG” />



Method Timing:


<Logger name=“MethodTiming” level=“DEBUG”/>

 


Redirect logs to separate log files:


<install Dir>\Embotics\vCommander\tomcat\common\classes\log4j2.xml

  1. Open the log4j2.xml file.


  1. Locate the Appenders section ( <Appenders> … </Appenders> )


Add the following appender (using billing records as example):


<RollingFile

fileName="${sys:catalina.home}/logs/billing_records.log"

filePattern="${sys:catalina.home}/logs/billing_records-%i.log"

ignoreExceptions="false"

name="billingrecords_appender">

<PatternLayout>

<Pattern>%d [%t] [%-5p] %c{3} - %m%n</Pattern>

</PatternLayout>

<Policies>

<SizeBasedTriggeringPolicy size="10 MB"/>

</Policies>

<DefaultRolloverStrategy fileIndex="min" max="1000"/>

</RollingFile>



Locate the Loggers section (<Loggers> … </Loggers>)


Locate the logger(s) you want to send logs to separate log files and add an appender reference to those loggers:


<Logger level="TRACE" name="billingrecords.generation">

<appender-ref ref="billingrecords_appender" />

</Logger>