Chat Support
Loupe - Log - Monitor - Resolve
Loupe / Developer's Guide / For Java / Developer's Guide - Agent Configuration
Developer's Guide - Agent Configuration

The Loupe Agent offers a range of configuration options to tune its behavior.  Most are designed to have good default values and not require any modification for your use, but a few minimum values need to be set to get the most out of Loupe.

Loupe defines an AgentConfiguration type to expose the strongly-typed properties for different configuration areas, each with multiple settings:

 Configuring the Agent
       

The Loupe Agent needs a minimal configuration to identify the application, set the logging folder, and connect to a Loupe Server.

Once you've instrumented an application you'll want to set up a connection with Loupe Server so you can collect data from everywhere your application runs and start managing errors.  You'll need to make a few changes to the configuration examples below to have them work:

  • Replace "Your Loupe Service Name" with the name of your Loupe Cloud-hosted Service.  If you don't have one yet, sign up for a free trial service.
  • Replace "Your Product" and "Your Application" with friendly values for your application.  A good analogy for Product is "Office" and Application is "Word", "Excel", and "PowerPoint". 

Configuration via Properties File

Loupe can also be configured using properties files - loupe.properties for the name/value pair text properties format and loupe.xml for the XML file format. The properties file need only be placed on the classpath, and Loupe will detect and utilize it.

Publisher.ProductName=Your Product
Publisher.ApplicationName=Your Application
Publisher.ApplicationVersion=1.0.0
Server.UseGibraltarService=true
Server.CustomerName=Your Loupe Service Name
Server.AutoSendSessions=true
Server.SendAllApplications=true

Configuration via Code

Loupe can be configured directly using its configuration object, for example:

AgentConfiguration configuration = AgentConfiguration.builder()
    .publisher(PublisherConfiguration.builder()
        .productName("Your Product")
        .applicationName("Your Application")
        .applicationVersion(new Version(1, 0, 0)).build())
    .server(ServerConfiguration.builder()
        .useGibraltarService(true)
        .customerName("Your Loupe Service Name")
        .sendAllApplications(true).build())
    .sessionFile(SessionFileConfiguration.builder()
        .folder("C:\\Temp").build())
    .build();

The configuration object can then be injected in an explicit call to start Loupe:

Log.start(configuration);

Or, if using the loupe-api package:

Loupe.start(configuration);
 Common Scenarios
Loupe has an extensive set of configuration options.  For a quick overview of some common configurations and purposes, see Developer's Guide - Agent Configuration Common Scenarios.
See Also