-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
cuongnm1
committed
Aug 22, 2022
1 parent
2b40674
commit f15e53f
Showing
17 changed files
with
33 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
.idea | ||
dist | ||
logger_rewrite.egg-info | ||
logult.egg-info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import logging | ||
from pathlib import Path | ||
from logult.logger import setup_logging | ||
|
||
|
||
def setup_log(save_dir='./', name_exp='info.log'): | ||
save_dir = Path(save_dir) | ||
save_dir.mkdir(parents=True, exist_ok=True) | ||
setup_logging(save_dir, exp_name=name_exp) | ||
logger = get_logger() | ||
return logger | ||
|
||
|
||
def get_logger(): | ||
logger = logging.getLogger() | ||
logger.setLevel(logging.DEBUG) | ||
return logger |
Binary file not shown.
File renamed without changes.
Binary file not shown.
File renamed without changes.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
[2022-06-29 17:55:15,655 - train - INFO] - Hello world | ||
[2022-06-30 10:32:20,378 - train - INFO] - Hello | ||
[2022-08-22 14:35:42,759 - train - INFO] - abc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,14 +4,14 @@ | |
long_description = fh.read() | ||
|
||
setuptools.setup( | ||
name="logger_rewrite", | ||
version="0.3", | ||
name="logult", | ||
version="0.1", | ||
author="cuongngm", | ||
author_email="[email protected]", | ||
description="log scripts", | ||
long_description=long_description, | ||
long_description_content_type="text/markdown", | ||
url="https://github.com/cuongngm/logger_rewrite", | ||
url="https://github.com/cuongngm/logult", | ||
packages=setuptools.find_packages(), | ||
install_requires=['requests' | ||
], | ||
|