Skip to content

Commit

Permalink
! v0.3.32
Browse files Browse the repository at this point in the history
  • Loading branch information
ALERTua committed Mar 6, 2024
1 parent d08ef44 commit 1ef1635
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
6 changes: 6 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
History
=======

0.3.32 (2024-06-03)
-------------------

* Precaution: fallback to UTC if local timezone raises an Exception


0.3.31 (2023-11-05)
-------------------

Expand Down
2 changes: 1 addition & 1 deletion global_logger/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

__author__ = """Alexey Rubasheff"""
__email__ = 'alexey.rubasheff@gmail.com'
__version__ = '0.3.31'
__version__ = '0.3.32'

from .global_logger import Log # noqa # pylint: disable=unused-import
6 changes: 5 additions & 1 deletion global_logger/global_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,11 @@ def __init__(self, name, level=None, global_level=True, logs_dir=None, log_sessi
Log.logs_dir.mkdir(parents=True)

if Log.log_session_filename is None:
now = pendulum.now(tz=pendulum.local_timezone())
try:
tz = pendulum.local_timezone()
except:
tz = pendulum.timezone('UTC')
now = pendulum.now(tz)
Log.log_session_filename = "%s.log" % now.strftime('%Y-%m-%d_%H-%M-%S')
self._clean_logs_folder()

Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.3.31
current_version = 0.3.32
commit = True
tag = True

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,6 @@
test_suite='tests',
tests_require=test_requirements,
url='https://github.com/alertua/global_logger',
version='0.3.31',
version='0.3.32',
zip_safe=False,
)

0 comments on commit 1ef1635

Please sign in to comment.