arpakitlib 1.8.301__py3-none-any.whl → 1.8.303__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of arpakitlib might be problematic. Click here for more details.
- arpakitlib/_arpakit_project_template_v_5/project/core/setup_logging.py +2 -2
- arpakitlib/ar_logging_util.py +7 -24
- {arpakitlib-1.8.301.dist-info → arpakitlib-1.8.303.dist-info}/METADATA +1 -3
- {arpakitlib-1.8.301.dist-info → arpakitlib-1.8.303.dist-info}/RECORD +7 -7
- {arpakitlib-1.8.301.dist-info → arpakitlib-1.8.303.dist-info}/WHEEL +0 -0
- {arpakitlib-1.8.301.dist-info → arpakitlib-1.8.303.dist-info}/entry_points.txt +0 -0
- {arpakitlib-1.8.301.dist-info → arpakitlib-1.8.303.dist-info}/licenses/LICENSE +0 -0
|
@@ -4,11 +4,11 @@ import logging
|
|
|
4
4
|
from arpakitlib.ar_logging_util import init_log_file
|
|
5
5
|
from project.core.settings import get_cached_settings
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
_normal_easy_logging_was_setup: bool = False
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
def setup_logging():
|
|
11
|
-
global
|
|
11
|
+
global _normal_easy_logging_was_setup
|
|
12
12
|
if _logging_was_setup:
|
|
13
13
|
return
|
|
14
14
|
|
arpakitlib/ar_logging_util.py
CHANGED
|
@@ -18,20 +18,15 @@ def init_log_file(*, log_filepath: str | None):
|
|
|
18
18
|
file.write(" \n")
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
_normal_easy_logging_was_setup: bool = False
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
def
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
)
|
|
28
|
-
global _logging_was_setup
|
|
29
|
-
if _logging_was_setup:
|
|
30
|
-
logging.getLogger().info("normal logging was already setup")
|
|
24
|
+
def setup_normal_easy_logging():
|
|
25
|
+
global _normal_easy_logging_was_setup
|
|
26
|
+
if _normal_easy_logging_was_setup:
|
|
27
|
+
logging.getLogger().info("normal easy logging was already setup")
|
|
31
28
|
return
|
|
32
29
|
|
|
33
|
-
init_log_file(log_filepath=log_filepath)
|
|
34
|
-
|
|
35
30
|
logger = logging.getLogger()
|
|
36
31
|
logger.setLevel(logging.INFO)
|
|
37
32
|
|
|
@@ -45,25 +40,13 @@ def setup_normal_logging(
|
|
|
45
40
|
stream_handler.setFormatter(stream_formatter)
|
|
46
41
|
logger.addHandler(stream_handler)
|
|
47
42
|
|
|
48
|
-
if log_filepath:
|
|
49
|
-
file_handler = logging.FileHandler(log_filepath)
|
|
50
|
-
file_handler.setLevel(logging.WARNING)
|
|
51
|
-
file_formatter = logging.Formatter(
|
|
52
|
-
"%(asctime)s | %(levelname)s | %(filename)s | %(funcName)s:%(lineno)d - %(message)s",
|
|
53
|
-
datefmt="%d.%m.%Y %H:%M:%S %p %Z %z",
|
|
54
|
-
)
|
|
55
|
-
file_handler.setFormatter(file_formatter)
|
|
56
|
-
logger.addHandler(file_handler)
|
|
57
|
-
|
|
58
43
|
_normal_logging_was_setup = True
|
|
59
44
|
|
|
60
|
-
logger.info("normal logging was setup")
|
|
45
|
+
logger.info("normal easy logging was setup")
|
|
61
46
|
|
|
62
47
|
|
|
63
48
|
def __example():
|
|
64
|
-
|
|
65
|
-
logging.getLogger().info("Hello world")
|
|
66
|
-
logging.getLogger().error("Hello world")
|
|
49
|
+
pass
|
|
67
50
|
|
|
68
51
|
|
|
69
52
|
if __name__ == '__main__':
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: arpakitlib
|
|
3
|
-
Version: 1.8.
|
|
3
|
+
Version: 1.8.303
|
|
4
4
|
Summary: arpakitlib
|
|
5
5
|
License: Apache-2.0
|
|
6
6
|
License-File: LICENSE
|
|
@@ -24,7 +24,6 @@ Requires-Dist: aiosmtplib (>=4.0.0,<5.0.0)
|
|
|
24
24
|
Requires-Dist: aiosqlite (>=0.21.0,<0.22.0)
|
|
25
25
|
Requires-Dist: alembic (>=1.14.1,<2.0.0)
|
|
26
26
|
Requires-Dist: asyncpg (>=0.30.0,<0.31.0)
|
|
27
|
-
Requires-Dist: asyncssh (>=2.19.0,<3.0.0)
|
|
28
27
|
Requires-Dist: bs4 (>=0.0.2,<0.0.3)
|
|
29
28
|
Requires-Dist: cachetools (>=5.5.1,<6.0.0)
|
|
30
29
|
Requires-Dist: celery (>=5.4.0,<6.0.0)
|
|
@@ -37,7 +36,6 @@ Requires-Dist: markdown (>=3.7,<4.0)
|
|
|
37
36
|
Requires-Dist: openpyxl (>=3.1.5,<4.0.0)
|
|
38
37
|
Requires-Dist: orjson (>=3.10.15,<4.0.0)
|
|
39
38
|
Requires-Dist: pandas (>=2.2.3,<3.0.0)
|
|
40
|
-
Requires-Dist: paramiko (>=4.0.0,<5.0.0)
|
|
41
39
|
Requires-Dist: pika (>=1.3.2,<2.0.0)
|
|
42
40
|
Requires-Dist: poetry (>=2.0.1,<3.0.0)
|
|
43
41
|
Requires-Dist: poetry-plugin-export (>=1.9.0)
|
|
@@ -190,7 +190,7 @@ arpakitlib/_arpakit_project_template_v_5/project/core/dump_file_storage_in_dir.p
|
|
|
190
190
|
arpakitlib/_arpakit_project_template_v_5/project/core/jinja2_templates.py,sha256=jCNLaBauGC7YNvZdTLNHuPp7hmRGt94O23Skg6ewo7o,352
|
|
191
191
|
arpakitlib/_arpakit_project_template_v_5/project/core/media_file_storage_in_dir.py,sha256=fMofTsfJtA8pp5lEUhucEUu3PBsmj-elaRZzExDsdLI,623
|
|
192
192
|
arpakitlib/_arpakit_project_template_v_5/project/core/settings.py,sha256=-1iKNOUQrHohahxoPl_V7e7Q53T_Sl1LTdu_EsBx9MU,7102
|
|
193
|
-
arpakitlib/_arpakit_project_template_v_5/project/core/setup_logging.py,sha256=
|
|
193
|
+
arpakitlib/_arpakit_project_template_v_5/project/core/setup_logging.py,sha256=ICL3SoMWmZ-cWsmZ3Vb2lyMotlMi51l9GrzUCeLH0So,1521
|
|
194
194
|
arpakitlib/_arpakit_project_template_v_5/project/core/util.py,sha256=iCwpuRqr6TfW0sKVH-3asQjhueJuad3ffq6sPI6ZUrs,347
|
|
195
195
|
arpakitlib/_arpakit_project_template_v_5/project/emailer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
196
196
|
arpakitlib/_arpakit_project_template_v_5/project/emailer/send_email.py,sha256=U3DaXSB1y4bRClT8cODgUbV2sDNyqL55NFByQPJCAwI,2184
|
|
@@ -409,7 +409,7 @@ arpakitlib/ar_jwt_util.py,sha256=Rhm4ywoTAn6yOV8NLjDASfAtAtheROxxDP40G3XjnuQ,761
|
|
|
409
409
|
arpakitlib/ar_list_of_dicts_to_xlsx.py,sha256=MyjEl4Jl4beLVZqLVQMMv0-XDtBD3Xh4Z_ZPDJeFu04,745
|
|
410
410
|
arpakitlib/ar_list_util.py,sha256=xaUk2BnLvDMP5HDh_GFfH-nIXCg-f8NsrrUKXRcVUsU,1788
|
|
411
411
|
arpakitlib/ar_log_async_func_if_error.py,sha256=qtr_eK9o1BrcA_7S9Ns7nVmOS81Yv6eMXHdasc4MftQ,495
|
|
412
|
-
arpakitlib/ar_logging_util.py,sha256=
|
|
412
|
+
arpakitlib/ar_logging_util.py,sha256=Q9R4-Cx3TAn3VLcKyNFeKS3luYBouj-umR6_TSKmVYw,1336
|
|
413
413
|
arpakitlib/ar_mongodb_util.py,sha256=2ECkTnGAZ92qxioL-fmN6R4yZOSr3bXdXLWTzT1C3vk,4038
|
|
414
414
|
arpakitlib/ar_need_type_util.py,sha256=XmY1kswz8j9oo5f9CxRu0_zgfvxWrXPYKOj6MM04sGk,2604
|
|
415
415
|
arpakitlib/ar_parse_command.py,sha256=1WTdQoWVshoDZ1jDaKeTzajfqaYHP3FNO0-REyo1aMY,3003
|
|
@@ -431,8 +431,8 @@ arpakitlib/ar_sqlalchemy_util.py,sha256=vWNCzFv13YsGRZaemkNI1_BF__4Z1_Vqm-gqQL1P
|
|
|
431
431
|
arpakitlib/ar_str_util.py,sha256=2lGpnXDf2h1cBZpVf5i1tX_HCv5iBd6IGnrCw4QWWlY,4350
|
|
432
432
|
arpakitlib/ar_type_util.py,sha256=Cs_tef-Fc5xeyAF54KgISCsP11NHyzIsglm4S3Xx7iM,4049
|
|
433
433
|
arpakitlib/ar_uppercase_env_keys.py,sha256=UFHLGIR70UB02eD7IAIBrZIbycwWCx3OP_W4J2cx2Jw,2395
|
|
434
|
-
arpakitlib-1.8.
|
|
435
|
-
arpakitlib-1.8.
|
|
436
|
-
arpakitlib-1.8.
|
|
437
|
-
arpakitlib-1.8.
|
|
438
|
-
arpakitlib-1.8.
|
|
434
|
+
arpakitlib-1.8.303.dist-info/METADATA,sha256=HZZ5IUXnRTprNYpXfBZKOCcounL3_cdrjIZ7oqHTZiM,3793
|
|
435
|
+
arpakitlib-1.8.303.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
436
|
+
arpakitlib-1.8.303.dist-info/entry_points.txt,sha256=36xqR3PJFT2kuwjkM_EqoIy0qFUDPKSm_mJaI7emewE,87
|
|
437
|
+
arpakitlib-1.8.303.dist-info/licenses/LICENSE,sha256=GPEDQMam2r7FSTYqM1mm7aKnxLaWcBotH7UvQtea-ec,11355
|
|
438
|
+
arpakitlib-1.8.303.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|