]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: hacking.rst: update backend logging instructions
authorRicardo Dias <rdias@suse.com>
Thu, 17 Oct 2019 09:15:33 +0000 (10:15 +0100)
committerRicardo Dias <rdias@suse.com>
Tue, 12 Nov 2019 11:50:51 +0000 (11:50 +0000)
Signed-off-by: Ricardo Dias <rdias@suse.com>
src/pybind/mgr/dashboard/HACKING.rst

index 25b50e2b4cd0f231609fcd3033d6eed92a306606..b273f0daee3f0e7bb42a116114d0f4d85d80c778 100644 (file)
@@ -1175,16 +1175,18 @@ How to access the manager module instance from a controller?
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 We provide the manager module instance as a global variable that can be
-imported in any module. We also provide a logger instance in the same way.
+imported in any module.
 
 Example:
 
 .. code-block:: python
 
+  import logging
   import cherrypy
-  from .. import logger, mgr
+  from .. import mgr
   from ..tools import ApiController, RESTController
 
+  logger = logging.getLogger(__name__)
 
   @ApiController('servers')
   class Servers(RESTController):
@@ -2024,7 +2026,7 @@ facilitates the basic tasks (Options, Commands, and common Mixins). The previous
 plugin could be rewritten like this:
 
 .. code-block:: python
-  
+
   from . import PLUGIN_MANAGER as PM
   from . import interfaces as I
   from .plugin import SimplePlugin as SP