Skip to content

Commit

Permalink
comment fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ali96343 committed Oct 29, 2023
1 parent 01518ff commit a49af0d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions py4web/server_adapters.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,19 @@ def check_level(level):
)


def logging_conf(level=logging.WARN, logger_name=__name__, m="w", test_log=False):
def logging_conf(level=logging.WARN, logger_name=__name__, fmode="w", test_log=False):

log_file = get_log_file()
log_to = dict()

if log_file:
if sys.version_info >= (3, 9):
log_to["filename"] = log_file
log_to["filemode"] = m
log_to["filemode"] = fmode
log_to["encoding"] = "utf-8"
else:
try:
h = logging.FileHandler(log_file, mode=m, encoding="utf-8")
h = logging.FileHandler(log_file, mode=fmode, encoding="utf-8")
log_to.update({"handlers": [h]})
except (LookupError, KeyError, ValueError) as ex:
print(f"{ex}, bad encoding {__file__}")
Expand Down Expand Up @@ -509,7 +509,7 @@ def salog(pat='SA:'):
return _srv_log
#caller = f" > {APP_NAME} > {sys._getframe().f_back.f_code.co_name}"
caller = f" > {APP_NAME} > {sys._getframe().f_back.f_code.co_name}"
dbg and salog().info(mess + caller)
log_warn=log_info
Expand Down

0 comments on commit a49af0d

Please sign in to comment.