---
schema_version: "1"
id: 96b788c1acde045bcdd450875575b73665381ddf344d0c44499e0b30c9ad7f62
title: Disabling Flex Gateway Log Output to Anypoint Platform
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/gateway/1.9/flex-conn-disable-logs.md
canonical_url: https://docs.mulesoft.com/gateway/1.9/flex-conn-disable-logs
source_site: docs.mulesoft.com
content_type: documentation
content_hash: c553c9a8716688e4421a846b8ef77506a9557d200e82777ef691bc3665635f2a
description: MuleSoft Documentation Site
release: "1.9"
latest: false
---
---
product: Omni Gateway
version: 1.9
---

# Disabling Flex Gateway Log Output to Anypoint Platform

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

Anypoint Flex Gateway logging provides insights into startup, shutdown, API requests, API responses,
policies, and Fluent Bit. Logging enables developers and administrators to identify and address
issues or anomalies. However, disabling log output to Anypoint Platform might be necessary.

Before disabling log output, consider the potential impact on troubleshooting capabilities. In some
cases, it’s more appropriate to adjust the log verbosity level.

You can disable sending the following logs to Anypoint Platform:

- Runtime logs, including:

  - The startup and shutdown of Flex Gateway, Fluent Bit, and Envoy.

  - Deployed APIs and policies.

  - Possible misconfigurations of Flex Gateway or other errors.

- Access logs, including:

  - The description of incoming interaction with Envoy over a period of time.

  - Incoming requests and responses for specific APIs.

> [!NOTE] You can only disable logs sent to Anypoint Platform. Standard output (STDOUT) remains
> unchanged.

You disable sending logs to Anypoint Platform by using a local configuration file. The following
tutorial describes how to create and deploy the file.

<table><colgroup><col> <col> <col> <col></colgroup><tbody><tr><td><div><div><p><span><a href="#linux"><img src="https://docs.mulesoft.com/gateway/1.9/_images/install-linux-logo.png" alt="20%" width="20%"></a></span></p></div></div></td><td><div><div><p><span><a href="#containers"><img src="https://docs.mulesoft.com/gateway/1.9/_images/install-container-logo.png" alt="25%" width="25%"></a></span></p></div></div></td><td><div><div><p><span><a href="#kubernetes"><img src="https://docs.mulesoft.com/gateway/1.9/_images/install-kubernetes-logo.png" alt="20%" width="20%"></a></span></p></div></div></td><td><div><div><p><span><a href="#openshift"><img src="https://docs.mulesoft.com/gateway/1.9/_images/install-openshift-logo.png" alt="20%" width="20%"></a></span></p></div></div></td></tr><tr><td><div><div><p><a href="#linux">Disable Anypoint Platform Log Output for Flex Gateway as a Linux Service</a></p></div></div></td><td><div><div><p><a href="#containers">Disable Anypoint Platform Log Output for Flex Gateway in a Container</a></p></div></div></td><td><div><div><p><a href="#kubernetes">Disable Anypoint Platform Log Output for Flex Gateway in a Kubernetes Cluster</a></p></div></div></td><td><div><div><p><a href="#openshift">Disable Anypoint Platform Log Output for Flex Gateway in an OpenShift Cluster</a></p></div></div></td></tr></tbody></table>

## Before You Begin

Before configuring Flex Gateway log output, complete the following task:

- Depending on your output, ensure that the service where you direct logs to is operational. For
  more information about log output services, refer to
  [Configuring Flex Gateway Output for Third-Party Services](https://docs.mulesoft.com/gateway/1.9/flex-conn-third-party-logs-config).

## Disable Anypoint Platform Log Output for Flex Gateway as a Linux Service

1.  Create a YAML configuration file in your Flex Gateway configuration directory. For example:

    ```ssh
    sudo touch /usr/local/share/mulesoft/flex-gateway/conf.d/disable-logs-config.yaml
    ```

2.  In the configuration file, set either `spec.logging.runtimeLogs.outputs.anypoint` or
    `spec.logging.accessLogs.outputs.anypoint` to `disabled`. The file resembles the following:

    ```yaml
    apiVersion: gateway.mulesoft.com/v1beta1
    kind: Configuration
    metadata:
      name: logging-config
    spec:
      logging:
        runtimeLogs:
          logLevel: info
          outputs:
            anypoint: disabled
        accessLogs:
          outputs:
            anypoint: disabled
    ```

3.  Save the file.

## Disable Anypoint Platform Log Output for Flex Gateway in a Container

> [!NOTE] If you have already added a volume for a folder with your Flex Gateway configuration
> files, skip to step 4.

1.  Press Ctrl+C to stop your Flex Gateway and any replicas.

2.  Create a folder named `app` in the directory with your Flex Gateway configuration files.

3.  Navigate to the `app` directory.

4.  Create a new configuration YAML file named `disable-logs-config.yaml`.

5.  In the configuration file, set either `spec.logging.runtimeLogs.outputs.anypoint` or
    `spec.logging.accessLogs.outputs.anypoint` to `disabled`. The file resembles the following:

    ```yaml
    apiVersion: gateway.mulesoft.com/v1beta1
    kind: Configuration
    metadata:
      name: logging-config
    spec:
      logging:
        runtimeLogs:
          logLevel: info
          outputs:
            anypoint: disabled
        accessLogs:
          outputs:
            anypoint: disabled
    ```

6.  Save the configuration file.

7.  Restart your Flex Gateway with the configuration directory volume:

    - Docker

    - Podman

    ```ssh
    docker run --rm \
    -v "$(pwd)":/usr/local/share/mulesoft/flex-gateway/conf.d \
    -p 8080:8080 \
    mulesoft/flex-gateway
    ```

    > [!NOTE] Specify an optional name you want to assign to your Flex Replica by including the
    > following: `-e FLEX_NAME=<name-for-flex-replica> \`.

    ```ssh
    podman run --rm \
    -v "$(pwd)":/usr/local/share/mulesoft/flex-gateway/conf.d \
    -p 8080:8080 \
    docker.io/mulesoft/flex-gateway
    ```

    > [!NOTE] Specify an optional name you want to assign to your Flex Replica by including the
    > following: `-e FLEX_NAME=<name-for-flex-replica> \`.

## Disable Anypoint Platform Log Output for Flex Gateway in a Kubernetes Cluster

To disable logging to Anypoint Platform:

1.  Create a new resource using a YAML configuration file with the following example output
    configuration details:

    ```yaml
    apiVersion: gateway.mulesoft.com/v1beta1
    kind: Configuration
    metadata:
      name: logging-config
    spec:
      logging:
        runtimeLogs:
          logLevel: info
          outputs:
            anypoint: disabled
        accessLogs:
          outputs:
            anypoint: disabled
    ```

2.  Set either `spec.logging.runtimeLogs.outputs.anypoint` or
    `spec.logging.accessLogs.outputs.anypoint` to `disabled`.

## Disable Anypoint Platform Log Output for Flex Gateway in an OpenShift Cluster

To disable logging to Anypoint Platform:

1.  Create a new resource using a YAML configuration file with the following example output
    configuration details:

    ```yaml
    apiVersion: gateway.mulesoft.com/v1beta1
    kind: Configuration
    metadata:
      name: logging-config
    spec:
      logging:
        runtimeLogs:
          logLevel: info
          outputs:
            anypoint: disabled
        accessLogs:
          outputs:
            anypoint: disabled
    ```

2.  Set either `spec.logging.runtimeLogs.outputs.anypoint` or
    `spec.logging.accessLogs.outputs.anypoint` to `disabled`.

## See Also

- [Configuring Flex Gateway Output for Third-Party Services](https://docs.mulesoft.com/gateway/1.9/flex-conn-third-party-logs-config)

- [Message Logging Policy](https://docs.mulesoft.com/gateway/1.9/policies-included-message-logging)

- [Registering and Running Flex Gateway](https://docs.mulesoft.com/gateway/1.9/flex-conn-reg-run)
