c.NotebookApp.server_extensions = [
    'ganymede.ganymede',
    'jupyter_nbgallery'
]
c.NotebookApp.allow_origin = 'https://nb.gallery'

from ganymede.ganymede import GanymedeHandler
import logstash
import os
if {"L41_LOGSTASH_HOST", "L41_LOGSTASH_PORT"} < set(os.environ):
    GanymedeHandler.handlers = [
        logstash.TCPLogstashHandler(
            os.environ["L41_LOGSTASH_HOST"],
            os.environ["L41_LOGSTASH_PORT"],
            version=1,
        )
    ]

c.NotebookApp.nbserver_extensions = {
    'ganymede.ganymede': 'ganymede.ganymede',
    'jupyter_nbgallery': 'jupyter_nbgallery'
}
c.NotebookApp.allow_origin = 'https://nb.gallery'

from ganymede.ganymede import GanymedeHandler
import logstash
import os
if {"L41_LOGSTASH_HOST", "L41_LOGSTASH_PORT"} < set(os.environ):
    GanymedeHandler.handlers = [
        logstash.TCPLogstashHandler(
            os.environ["L41_LOGSTASH_HOST"],
            os.environ["L41_LOGSTASH_PORT"],
            version=1,
        )
    ]

Change server_extensions to nbserver_extensions since server_extensions is deprecated.
Change server_extensions to nbserver_extensions since server_extensions is deprecated.

- c.NotebookApp.server_extensions = [
+ c.NotebookApp.nbserver_extensions = {
-     'ganymede.ganymede',
-     'jupyter_nbgallery'
- ]
+     'ganymede.ganymede': 'ganymede.ganymede',
+     'jupyter_nbgallery': 'jupyter_nbgallery'
+ }
  c.NotebookApp.allow_origin = 'https://nb.gallery'
  
  from ganymede.ganymede import GanymedeHandler
  import logstash
  import os
  if {"L41_LOGSTASH_HOST", "L41_LOGSTASH_PORT"} < set(os.environ):
      GanymedeHandler.handlers = [
          logstash.TCPLogstashHandler(
              os.environ["L41_LOGSTASH_HOST"],
              os.environ["L41_LOGSTASH_PORT"],
              version=1,
          )
      ]
  
Change server_extensions to nbserver_extensions since server_extensions is deprecated.
## Code Before:
c.NotebookApp.server_extensions = [
    'ganymede.ganymede',
    'jupyter_nbgallery'
]
c.NotebookApp.allow_origin = 'https://nb.gallery'

from ganymede.ganymede import GanymedeHandler
import logstash
import os
if {"L41_LOGSTASH_HOST", "L41_LOGSTASH_PORT"} < set(os.environ):
    GanymedeHandler.handlers = [
        logstash.TCPLogstashHandler(
            os.environ["L41_LOGSTASH_HOST"],
            os.environ["L41_LOGSTASH_PORT"],
            version=1,
        )
    ]

## Instruction:
Change server_extensions to nbserver_extensions since server_extensions is deprecated.
## Code After:
c.NotebookApp.nbserver_extensions = {
    'ganymede.ganymede': 'ganymede.ganymede',
    'jupyter_nbgallery': 'jupyter_nbgallery'
}
c.NotebookApp.allow_origin = 'https://nb.gallery'

from ganymede.ganymede import GanymedeHandler
import logstash
import os
if {"L41_LOGSTASH_HOST", "L41_LOGSTASH_PORT"} < set(os.environ):
    GanymedeHandler.handlers = [
        logstash.TCPLogstashHandler(
            os.environ["L41_LOGSTASH_HOST"],
            os.environ["L41_LOGSTASH_PORT"],
            version=1,
        )
    ]
