Skip to content

Commit ad32ec8

Browse files
committed
Merge branch 'release-1.5.1'
2 parents 4652aae + a7e3d03 commit ad32ec8

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

marcelbroccoli/logger.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818

1919
# logging defaults
20+
DT_FORMAT = "%Y-%m-%d %H:%M:%S.%f"
2021
LOG_FORMAT = '%(asctime)s - %(filename)s - %(levelname)s - %(message)s'
2122
LOG_LEVEL = logging.ERROR
2223
LOG_MAX_BYTES = 2000000
@@ -45,7 +46,7 @@ def __init__(self, name:str, level:int=0):
4546
'''
4647
Setup log with custom settings.
4748
'''
48-
def configure(self, logfile:str, name:str, dtformat="%Y-%m-%d %H:%M:%S.%f", level:str=LOG_LEVEL,
49+
def configure(self, logfile:str, name:str, dtformat=DT_FORMAT, level:str=LOG_LEVEL,
4950
maxbytes=LOG_MAX_BYTES, backupcount=LOG_BACKUP_COUNT,
5051
logformat=LOG_FORMAT, errorcode=ec.errorcode):
5152

@@ -93,13 +94,13 @@ def error(self, msg:str):
9394

9495

9596
def warning(self, msg:str):
96-
logging.Logger.error(self, msg)
97+
logging.Logger.warning(self, msg)
9798
if self.level <= logging.WARNING:
9899
print(f"{colorama.Fore.YELLOW}{msg}{colorama.Style.RESET_ALL}")
99100

100101

101102
def warn(self, msg:str):
102-
logging.Logger.error(self, msg)
103+
logging.Logger.warning(self, msg)
103104
if self.level <= logging.WARN:
104105
print(f"{colorama.Fore.YELLOW}{msg}{colorama.Style.RESET_ALL}")
105106

marcelbroccoli/version.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# meta data
22
__author__ = "Marcel Gerber"
3-
__date__ = "2023-11-10"
4-
__version__ = "1.5.0"
3+
__date__ = "2024-04-05"
4+
__version__ = "1.5.1"

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
setup(
44
name="marcelbroccoli",
5-
version="1.5.0",
5+
version="1.5.1",
66
description="Marcel's custom functions",
77
url="https://github.com/chemage/marcelbroccoli",
88
author="Marcel Gerber",

0 commit comments

Comments
 (0)