Configure .NET Agent Logging

You can run the .NET agent in various modes and set log file options. The .NET agent uses Log4net functionality for these functions. If you want to use other Log4net functionality, see Log4net documentation at http://logging.apache.org/log4net/release/features.html.
apmdevops106
You can run the .NET agent in various modes and set log file options. The .NET agent uses Log4net functionality for these functions. If you want to use other Log4net functionality, see Log4net documentation at http://logging.apache.org/log4net/release/features.html.
The .NET agent log files are located in the <Agent_Home> directory. Typically the <Agent_Home> directory is named
wily
.
2
2
Configure IntroscopeAgent.profile Logging Properties
You can configure several logging-related properties in the introscopeAgent.profile.
Follow these steps:
  1. Navigate to the <Agent_Home> directory and open the IntroscopeAgent.profile in a text editor.
  2. Configure these logging-related properties as required.
    After you after install the .NET agent, add these properties to the agent profile and uncomment as required.
    • i
      ntroscope.agent.log.level
      Sets the log level of the agent log.
      Default:
      INFO
      Values:
      INFO, DEBUG
      Monitored application restart required
      : Yes
    • introscope.agent.log.max.file.size
      The maximum size of the log file before output gets rolled into a backup file.
      Default:
      200 MB
      Monitored application restart required
      : Yes
    • introscope.agent.log.max.roll.backups
      The maximum number of backup log files to keep before the oldest file is deleted.
      Default:
      4
      Monitored application restart required
      : Yes
  3. Save the file.
  4. Restart the monitored .NET application.
Configure the .NET Agent Log File Location
Log files are written to the <Agent_Home>\logs directory by default. This directory is usually: C:\Program Files\CA APM\Introscope<version>\wily\logs, where <version> is the installed version of CA APM
.
Follow these steps:
  1. Navigate to the <Agent_Home> directory and open the IntroscopeAgent.profile in a text editor.
  2. Add the
    introscope.agent.logfile
    property to the agent profile, and uncomment if necessary.
    This property provides the log file where the agent logs information about transaction traces and agent services. The default is logs/IntroscopeAgent.log.
    The
    introscope.agent.logfile
    property is CA APM specific. The Azure site extension does not use the
    introscope.agent.logfile
    property. The Azure site extension stores its logs in D:\Logfiles.
  3. Save and close the file.
  4. Restart the monitored application.
.NET Agent Log Files and Automatic Agent Naming
By default, the .NET agent obtains its name automatically. When the .NET agent name is found automatically, the log files that are associated with that agent are also named automatically using that same information. Log files that the agent generates record information about the PBDs used and the probes that are inserted during the instrumentation process. By default, if automatic naming is used, the log file that is created is initially named using a timestamp in the file name. For example:
AutoProbe20060928-175024.log
Once the agent name becomes available, the log file is renamed to include the agent name. For example, if the agent name is
MyDomain//MyAgent
, where
MyDomain
is the domain, and
MyAgent
is the instance:
AutoProbeMyDomain_MyStuff.log
You can have log files with the timestamp name rather than the actual log name. In this case, the process might time out before obtaining the agent name. Also, if you use advanced Log4Net functionality, the automatic naming capability might not work.
When loading the .NET agent profile from a resource on a classpath, the NativeProfiler cannot write to the log file. This situation happens because the IntroscopeAgent.profile file is located within a resource.
If you want to disable automatic log file naming, set the introscope.agent.disableLogFileAutoNaming property in the agent profile to true.
Default Domain Logs
The default domain does not connect to an Enterprise Manager to report metrics, and does not run any applications itself. However, the .NET agent that resides on the default domain still generates log files. The .NET agent generates log files because it handles all the byte code instrumentation for all application domains that the default domain hosts. One of these files, AutoProbe.DefaultDomain.log, contains information about the byte code instrumentation that occurs in the default domain. As all byte code instrumentation occurs in the default domain, these log files contain critical information regarding the instrumentation.
The default domain also generates the IntroscopeAgent.DefaultDomain.log file for the .NET agent.