# Class ProtocolLoggingProxy

java.lang.Object
org.mariadb.jdbc.internal.logging.ProtocolLoggingProxy

All Implemented Interfaces:
  `InvocationHandler`

public class ProtocolLoggingProxy extends Object implements InvocationHandler

## Constructor Summary

Constructors
Constructor
Description
`ProtocolLoggingProxy(Protocol protocol, Options options)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`Object`
`invoke(Object proxy, Method method, Object[] args)`
`String`
`subQuery(String sql)`
Get query, truncated if to big.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### ProtocolLoggingProxy

public ProtocolLoggingProxy(Protocol protocol, Options options)
Constructor. Will create a proxy around protocol to log queries.

Parameters:
  `protocol` - protocol to proxy
  `options` - options

## Method Details

### invoke

public Object invoke(Object proxy, Method method, Object[] args) throws Throwable

Specified by:
  `invoke` in interface `InvocationHandler`
Throws:
  `Throwable`

### subQuery

public String subQuery(String sql)
Get query, truncated if to big.

Parameters:
  `sql` - current query
Returns:
  possibly truncated query if too big