[VOL-634] Remove fluentd logging reference from voltha services

This update removes the "hardcoded" logging framework (fluentd)
from the voltha, ofagent and netconf services.  The logging is
now determined at deployment time.  Testing was done in kubernetes
environment and minimally in docker swarm mode environment (docker
swarm mode is not required for voltha 1.3).  A separate Jira will
be raised to adjust the docker swarm deployment files, i.e. direct
the logs to fluentd/fluentd-agg listen ports instead of writing locally.

Change-Id: Ic780fc9633f0f833f961c97dc59d89eed2112a53
diff --git a/ofagent/main.py b/ofagent/main.py
index 5887b75..23335bb 100755
--- a/ofagent/main.py
+++ b/ofagent/main.py
@@ -33,7 +33,6 @@
     external_host_address=os.environ.get('EXTERNAL_HOST_ADDRESS',
                                          get_my_primary_local_ipv4()),
     grpc_endpoint=os.environ.get('GRPC_ENDPOINT', 'localhost:50055'),
-    fluentd=os.environ.get('FLUENTD', None),
     instance_id=os.environ.get('INSTANCE_ID', os.environ.get('HOSTNAME', '1')),
     internal_host_address=os.environ.get('INTERNAL_HOST_ADDRESS',
                                          get_my_primary_local_ipv4()),
@@ -77,15 +76,6 @@
                         default=defs['external_host_address'],
                         help=_help)
 
-    _help = ('<hostname>:<port> to fluentd server (default: %s). (If not '
-             'specified (None), the address from the config file is used'
-             % defs['fluentd'])
-    parser.add_argument('-F', '--fluentd',
-                        dest='fluentd',
-                        action='store',
-                        default=defs['fluentd'],
-                        help=_help)
-
     _help = ('gRPC end-point to connect to. It can either be a direct'
              'definition in the form of <hostname>:<port>, or it can be an'
              'indirect definition in the form of @<service-name> where'
@@ -217,8 +207,7 @@
         verbosity_adjust = (args.verbose or 0) - (args.quiet or 0)
         self.log = setup_logging(self.config.get('logging', {}),
                                  args.instance_id,
-                                 verbosity_adjust=verbosity_adjust,
-                                 fluentd=args.fluentd)
+                                 verbosity_adjust=verbosity_adjust)
 
         # components
         self.connection_manager = None
diff --git a/ofagent/ofagent.production.yml b/ofagent/ofagent.production.yml
deleted file mode 100644
index e812cf4..0000000
--- a/ofagent/ofagent.production.yml
+++ /dev/null
@@ -1,45 +0,0 @@
-logging:
-    version: 1
-
-    formatters:
-      brief:
-        format: '%(message)s'
-      default:
-        format: '%(asctime)s.%(msecs)03d %(levelname)-8s %(module)s.%(funcName)s %(message)s'
-        datefmt: '%Y%m%dT%H%M%S'
-      fluent_fmt:
-        '()': fluent.handler.FluentRecordFormatter
-        format:
-          level: '%(levelname)s'
-          hostname: '%(hostname)s'
-          where: '%(module)s.%(funcName)s'
-      fluent_default:
-        format: '%(asctime)s.%(msecs)03d %(levelname)-8s %(threadName)s %(module)s.%(funcName)s %(message)s'
-        datefmt: '%Y%m%dT%H%M%S'
-
-    handlers:
-        fluent:
-            class: fluent.handler.FluentHandler
-            host: localhost
-            port: 24224
-            tag: ofagent.logging
-            # Since fluent formatter output an exception with grpc data, use
-            # a basic formatter for now.
-            # formatter: fluent_fmt
-            formatter: fluent_default
-            level: INFO
-        null:
-            class: logging.NullHandler
-
-    loggers:
-        amqp:
-            handlers: [null]
-            propagate: False
-        conf:
-            handlers: [null]
-            propagate: False
-        '': # root logger
-            handlers: [fluent]
-            level: INFO # this can be bumped up/down by -q and -v command line
-                        # options
-            propagate: False
diff --git a/ofagent/ofagent.yml b/ofagent/ofagent.yml
index 25b06a4..92c7787 100644
--- a/ofagent/ofagent.yml
+++ b/ofagent/ofagent.yml
@@ -7,15 +7,6 @@
       default:
         format: '%(asctime)s.%(msecs)03d %(levelname)-8s %(module)s.%(funcName)s %(message)s'
         datefmt: '%Y%m%dT%H%M%S'
-      fluent_fmt:
-        '()': fluent.handler.FluentRecordFormatter
-        format:
-          level: '%(levelname)s'
-          hostname: '%(hostname)s'
-          where: '%(module)s.%(funcName)s'
-      fluent_default:
-        format: '%(asctime)s.%(msecs)03d %(levelname)-8s %(threadName)s %(module)s.%(funcName)s %(message)s'
-        datefmt: '%Y%m%dT%H%M%S'
 
     handlers:
         console:
@@ -23,16 +14,6 @@
             level: DEBUG
             formatter: default
             stream: ext://sys.stdout
-        fluent:
-            class: fluent.handler.FluentHandler
-            host: localhost
-            port: 24224
-            tag: ofagent.logging
-            # Since fluent formatter output an exception with grpc data, use
-            # a basic formatter for now.
-            # formatter: fluent_fmt
-            formatter: fluent_default
-            level: DEBUG
         localRotatingFile:
             class: logging.handlers.RotatingFileHandler
             filename: ofagent.log
@@ -48,10 +29,9 @@
             handlers: [null]
             propagate: False
         conf:
-            handlers: [null]
             propagate: False
         '': # root logger
-            handlers: [console, fluent, localRotatingFile]
+            handlers: [console, localRotatingFile]
             level: INFO # this can be bumped up/down by -q and -v command line
                         # options
             propagate: False