ATS : Custom log level on ATS agents

Introduction

By default, the log level on the agents is the same as the Test Executor's log level

This page describes how to change that level on the agent side. This makes sense for example when running performance tests and you want a verbose log level(like INFO) on the Test Executor and not so verbose log level(like ERROR) on the agent side.

The presented info concerns only logging which goes to Test Executor DB.

It does not change the Agent log which goes to its log file.



How to do it

Somewhere in your test code, you run code like the following:

// list with needed imports
import com.axway.ats.agent.webapp.client.AgentConfigurationClient;
import com.axway.ats.log.LogLevel;

// set the Agent log level to WARN
new AgentConfigurationClient( <agent address> ).setLogLevel( LogLevel.WARN );

The right place to put such code is some method annotated with @BeforeClass or @BeforeSuite TestNG annotation.



Back to parent page

Go to Table of Contents