Almat Kairatov
Almat Kairatov

Reputation: 1

How to Run Element Synapse in Debug Mode and Restart on Code Changes?

I am trying to run Synapse in debug mode and ensure that all logs and print statements appear in the terminal. Additionally, I want it to restart automatically whenever code changes occur.

I managed to run Synapse locally using: (.venv) superuser@DESKTOP-OB83S8J:/mnt/c/Users/User/Desktop/messenger/messenger-back$ python watch.py

This server is configured to use 'matrix.org' as its trusted key server via the
'trusted_key_servers' config option. 'matrix.org' is a good choice for a key
server since it is long-lived, stable and trusted. However, some admins may
wish to use another server for this purpose.

To suppress this warning and continue using 'matrix.org', admins should set
'suppress_key_server_warning' to 'true' in homeserver.yaml.
--------------------------------------------------------------------------------
*** and nothing prints here, I don't know, are the logs supposed to show up here?

Here is my homeserver.yaml:

server_name: "server_name"
pid_file: /mnt/c/Users/User/Desktop/messenger/messenger-back/homeserver.pid
listeners:
  - port: 8888
    tls: false
    type: http
    x_forwarded: true
    bind_addresses: ['::1', '127.0.0.1']
    resources:
      - names: [client, federation]
        compress: false
database:
  name: psycopg2
  args:
    user: synapse_user
    password: 1q2w3e
    database: synapse
    host: localhost
    cp_min: 5
    cp_max: 10

enable_registration: True
enable_registration_without_verification: True
log_config: "/mnt/c/Users/User/Desktop/messenger/messenger-back/afm2.log.config"
media_store_path: /mnt/c/Users/User/Desktop/messenger/messenger-back/media_store
registration_shared_secret: "P.avT1@OM3PRol~61=Od:.a*E29&mnB1T^hZsvig3HsRb*~+kM"
report_stats: false
macaroon_secret_key: "RwDDsF4SUFAouWm7vy9d9dqpEkkbf4F_8Jg2l^ifR9##9kq+8e"
form_secret: "cxw,:fFa9^fEzAcT_QbDxG.WOWVO1EgOpVW0&~:zZUYbsL_:N7"
signing_key_path: "/mnt/c/Users/User/Desktop/messenger/messenger-back/afm2.signing.key"
trusted_key_servers:
  - server_name: "matrix.org"
logging:
  level: DEBUG

Stack overflow asks me to fill up with some words. This is just for that, I do not know what to write.

Upvotes: 0

Views: 14

Answers (0)

Related Questions