---
# System prepended metadata

title: ACA-Py per-tenant settings

---

# ACA-Py per-tenant settings
- [Issue#2209]() allow configuration of following startup parameters at tenant level:
```
ACAPY_LOG_LEVEL
ACAPY_INVITE_PUBLIC
ACAPY_PUBLIC_INVITES
ACAPY_AUTO_ACCEPT_INVITES
ACAPY_AUTO_ACCEPT_REQUESTS
ACAPY_AUTO_PING_CONNECTION
ACAPY_MONITOR_PING
ACAPY_AUTO_RESPOND_MESSAGES
ACAPY_AUTO_RESPOND_CREDENTIAL_OFFER
ACAPY_AUTO_RESPOND_CREDENTIAL_REQUEST
ACAPY_AUTO_VERIFY_PRESENTATION
ACAPY_NOTIFY_REVOCATION
ACAPY_AUTO_REQUEST_ENDORSEMENT
ACAPY_AUTO_WRITE_TRANSACTIONS
ACAPY_CREATE_REVOCATION_TRANSACTIONS
``` 

- Related PR https://github.com/hyperledger/aries-cloudagent-python/pull/2233

- Added `extra_settings` dict field to request body of the following endpoints:
  - POST /multitenancy/wallet - creating a tenant subwallet
  - PUT /multitenancy/wallet/{wallet_id} - updating subwallet
  - Example `extra_settings`
  ```
  {
      ...
      "extra_settings": {
        "ACAPY_LOG_LEVEL": "DEBUG",
        "ACAPY_INVITE_PUBLIC": "true",
        "ACAPY_PUBLIC_INVITES": "False"
      },
      "label": "Alice",
      ...
  }
  ```
  
# Per Tenant Log Access
- Issue: https://github.com/bcgov/DITP/issues/23
- PR: https://github.com/hyperledger/aries-cloudagent-python/pull/2234
- `ACAPY_LOG_ALIAS`
```
2023-05-16 06:40:50,605 [tenant_identifier] filename ERROR ..... log message .....
```
``` 
./aries_cloudagent/config/logging.py

LOG_FORMAT_FILE_ALIAS = logging.Formatter(
    "%(asctime)s [%(logger_alias)s] %(name)s %(levelname)s %(message)s"
)
LOG_FORMAT_FILE_NO_ALIAS = logging.Formatter(
    "%(asctime)s %(name)s %(levelname)s %(message)s"
)
LOG_FORMAT_STREAM = logging.Formatter("%(asctime)s %(name)s %(levelname)s %(message)s")


def get_logger_with_handlers(
    settings: BaseSettings, logger: logging.Logger
) -> logging.Logger:
    if settings.get("log.file"):
        file_path = settings.get("log.file")
        logger_alias = settings.get("log.alias")
        file_handler = logging.FileHandler(file_path)
        if logger_alias:
            file_handler.setFormatter(LOG_FORMAT_FILE_ALIAS)
        else:
            file_handler.setFormatter(LOG_FORMAT_FILE_NO_ALIAS)
        logger.addHandler(file_handler)
        std_out_handler = logging.StreamHandler(sys.stdout)
        std_out_handler.setFormatter(LOG_FORMAT_STREAM)
        logger.addHandler(std_out_handler)
        if logger_alias:
            logger = logging.LoggerAdapter(logger, {"logger_alias": logger_alias})
        # logger_level = (
        #     (settings.get("log.level")).upper()
        #     if settings.get("log.level")
        #     else logging.INFO
        # )
        # logger.setLevel(logger_level)
    return logger
```

