]> www.infradead.org Git - users/sagi/libnvme.git/commit
log: split log variables from root object
authorDaniel Wagner <dwagner@suse.de>
Tue, 7 May 2024 14:17:59 +0000 (16:17 +0200)
committerDaniel Wagner <wagi@monom.org>
Fri, 10 May 2024 07:13:51 +0000 (09:13 +0200)
commitbec7a98636546f68ff1efe6794b2d546cf63febc
tree4bf7634c460bf19b011cbd6cc653a9305523e1eb
parent4f2c54049939c288e4d74ca45bb665b343591097
log: split log variables from root object

The original plan was to avoid any global variables in the library. Thus
the logging variables were tied to the root object which is available
via the fabric API.

The default NVME API doesn't have the root object thus we had to add a
global variable to set log level etc. But the API to set these variables
is done via the root object.

This approach enforces the caller side to create an default root object
to initialize the default logging level. This introduces unnecessary
complexity on the caller side and wastes resources.

Let's split the default logging setting from the root object.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
src/libnvme.map
src/nvme/json.c
src/nvme/log.c
src/nvme/log.h
src/nvme/mi.c
src/nvme/private.h
src/nvme/tree.c