
'''Script to kick off the server.'''

import logging
import traceback

from server.env import Env
from server.controller import Controller


def main():
    '''Set up logging and run the server.'''
    logging.basicConfig(level=logging.INFO,
                        format='%(asctime)s %(levelname)-9s %(message)-100s '
                               '%(name)s [%(filename)s:%(lineno)d]')
    logging.info('ElectrumX server starting')
    try:
        controller = Controller(Env())
        controller.run()
    except Exception:
        traceback.print_exc()
        logging.critical('ElectrumX server terminated abnormally')
    else:
        logging.info('ElectrumX server terminated normally')


if __name__ == '__main__':
    main()


'''Script to kick off the server.'''

import logging
import traceback

from server.env import Env
from server.controller import Controller


def main():
    '''Set up logging and run the server.'''
    logging.basicConfig(level=logging.INFO,
                        format='%(asctime)s %(levelname)-7s %(message)-100s '
                               '[%(filename)s:%(lineno)d]')
    logging.info('ElectrumX server starting')
    try:
        controller = Controller(Env())
        controller.run()
    except Exception:
        traceback.print_exc()
        logging.critical('ElectrumX server terminated abnormally')
    else:
        logging.info('ElectrumX server terminated normally')


if __name__ == '__main__':
    main()

Remove logger name from logs
Remove logger name from logs

  
  '''Script to kick off the server.'''
  
  import logging
  import traceback
  
  from server.env import Env
  from server.controller import Controller
  
  
  def main():
      '''Set up logging and run the server.'''
      logging.basicConfig(level=logging.INFO,
-                         format='%(asctime)s %(levelname)-9s %(message)-100s '
+                         format='%(asctime)s %(levelname)-7s %(message)-100s '
-                                '%(name)s [%(filename)s:%(lineno)d]')
+                                '[%(filename)s:%(lineno)d]')
      logging.info('ElectrumX server starting')
      try:
          controller = Controller(Env())
          controller.run()
      except Exception:
          traceback.print_exc()
          logging.critical('ElectrumX server terminated abnormally')
      else:
          logging.info('ElectrumX server terminated normally')
  
  
  if __name__ == '__main__':
      main()
  
Remove logger name from logs
## Code Before:

'''Script to kick off the server.'''

import logging
import traceback

from server.env import Env
from server.controller import Controller


def main():
    '''Set up logging and run the server.'''
    logging.basicConfig(level=logging.INFO,
                        format='%(asctime)s %(levelname)-9s %(message)-100s '
                               '%(name)s [%(filename)s:%(lineno)d]')
    logging.info('ElectrumX server starting')
    try:
        controller = Controller(Env())
        controller.run()
    except Exception:
        traceback.print_exc()
        logging.critical('ElectrumX server terminated abnormally')
    else:
        logging.info('ElectrumX server terminated normally')


if __name__ == '__main__':
    main()

## Instruction:
Remove logger name from logs
## Code After:

'''Script to kick off the server.'''

import logging
import traceback

from server.env import Env
from server.controller import Controller


def main():
    '''Set up logging and run the server.'''
    logging.basicConfig(level=logging.INFO,
                        format='%(asctime)s %(levelname)-7s %(message)-100s '
                               '[%(filename)s:%(lineno)d]')
    logging.info('ElectrumX server starting')
    try:
        controller = Controller(Env())
        controller.run()
    except Exception:
        traceback.print_exc()
        logging.critical('ElectrumX server terminated abnormally')
    else:
        logging.info('ElectrumX server terminated normally')


if __name__ == '__main__':
    main()
