mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-27 20:42:26 +00:00
Log tweaks (#1546)
* add path to logs * add path to logs more info Co-authored-by: jmaslek <jmaslek11@gmail.com>
This commit is contained in:
@@ -76,7 +76,7 @@ class FormatterWithExceptions(logging.Formatter):
|
||||
.replace("\t", " ")
|
||||
.replace("\r", "")
|
||||
.replace("'", "`")
|
||||
.replace('"', "`")
|
||||
.replace('"', "``")
|
||||
)
|
||||
|
||||
return filtered_text
|
||||
|
||||
@@ -134,7 +134,12 @@ class BaseController(metaclass=ABCMeta):
|
||||
|
||||
def log_queue(self, message: str) -> None:
|
||||
if self.queue:
|
||||
logger.info("%s: %s", message, "/".join(self.queue))
|
||||
logger.info(
|
||||
"%s: {path: '%s', queue: '%s'}",
|
||||
message,
|
||||
self.PATH,
|
||||
"/".join(self.queue),
|
||||
)
|
||||
|
||||
@log_start_end(log=logger)
|
||||
def switch(self, an_input: str) -> List[str]:
|
||||
@@ -178,7 +183,13 @@ class BaseController(metaclass=ABCMeta):
|
||||
known_args.cmd = "reset"
|
||||
|
||||
set_command_location(f"{self.PATH}{known_args.cmd}")
|
||||
logger.info("CMD: %s", an_input)
|
||||
logger.info(
|
||||
"CMD: {path: '%s', known_cmd: '%s', other_args: '%s' input: '%s'}",
|
||||
self.PATH,
|
||||
known_args.cmd,
|
||||
str(other_args),
|
||||
an_input,
|
||||
)
|
||||
self.log_queue("QUEUE")
|
||||
|
||||
# This is what mutes portfolio issue
|
||||
|
||||
Reference in New Issue
Block a user