Made some attributes protected.
This commit is contained in:
parent
62f25f3392
commit
1487575015
1 changed files with 6 additions and 6 deletions
|
@ -35,9 +35,9 @@ class Log:
|
||||||
"""
|
"""
|
||||||
|
|
||||||
self.log_path = log_path
|
self.log_path = log_path
|
||||||
self.console_out = console_out
|
self._console_out = console_out
|
||||||
self.console_colored = console_colored
|
self._console_colored = console_colored
|
||||||
self.file_colored = file_colored
|
self._file_colored = file_colored
|
||||||
|
|
||||||
def write(self, msg: str, msg_type: str = "info", prefix: str = ""):
|
def write(self, msg: str, msg_type: str = "info", prefix: str = ""):
|
||||||
"""
|
"""
|
||||||
|
@ -48,10 +48,10 @@ class Log:
|
||||||
:param prefix: An optional prefix that gets added at the beginning of the message.
|
:param prefix: An optional prefix that gets added at the beginning of the message.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
logfile_msg = self._format_msg(msg, msg_type, self.file_colored, prefix) + "\n"
|
logfile_msg = self._format_msg(msg, msg_type, self._file_colored, prefix) + "\n"
|
||||||
|
|
||||||
if self.console_out:
|
if self._console_out:
|
||||||
console_msg = self._format_msg(msg, msg_type, self.console_colored, prefix)
|
console_msg = self._format_msg(msg, msg_type, self._console_colored, prefix)
|
||||||
|
|
||||||
print(console_msg)
|
print(console_msg)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue