Skip to content
Snippets Groups Projects
Select Git revision
  • b15464d04004ec1fd597690a814da25ea7e23c40
  • master default protected
  • MAM-110-propagate-output-sasid
  • MAM-109-specify-ingest-location
  • master-backup-september-2024
5 results

views.py

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    lofar2_config.py 705 B
    #! /usr/bin/env python3
    
    import logging
    
    
    def configure_logging():
        # Always also log the hostname because it makes the origin of the log clear.
        import socket
        hostname = socket.gethostname()
        # Set up logging in a way that it can be understood by a human reader, be
        # easily grep'ed, be parsed with a couple of shell commands and
        # easily fed into an Kibana/Elastic search system.
        logging.basicConfig(format = '%(asctime)s.%(msecs)d %(levelname)s - HOST="{}" PID="%(process)d" TNAME="%(threadName)s" TID="%(thread)d" FILE="%(pathname)s" LINE="%(lineno)d" FUNC="%(funcName)s" MSG="%(message)s"'.format(hostname), datefmt = '%Y-%m-%dT%H:%M:%S', level = logging.INFO, Force = True)