Skip to content

Commit bb021e1

Browse files
pdgendtnashif
authored andcommitted
doc: develop: west: Remove deprecated west.log
The global state west.log is deprecated, replace with WestCommand logging. Signed-off-by: Pieter De Gendt <[email protected]>
1 parent 7df6649 commit bb021e1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

doc/develop/west/extensions.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ details on the west APIs you can use, see :ref:`west-apis`.
8787
from textwrap import dedent # just for nicer code indentation
8888
8989
from west.commands import WestCommand # your extension must subclass this
90-
from west import log # use this for user output
9190
9291
class MyCommand(WestCommand):
9392
@@ -125,8 +124,8 @@ details on the west APIs you can use, see :ref:`west-apis`.
125124
# $ west my-command-name -o FOO BAR
126125
# --optional is FOO
127126
# required is BAR
128-
log.inf('--optional is', args.optional)
129-
log.inf('required is', args.required)
127+
self.inf('--optional is', args.optional)
128+
self.inf('required is', args.required)
130129
131130
You can ignore the second argument to ``do_run()`` (``unknown_args`` above), as
132131
``WestCommand`` will reject unknown arguments by default. If you want to be

0 commit comments

Comments
 (0)