diff --git a/__init__.py b/__init__.py deleted file mode 100644 index afa0d8a..0000000 --- a/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -from ._logger import * -from .utils.common import * -#from .utils.printfmt import * -from .utils import printfmt \ No newline at end of file diff --git a/clog/__init__.py b/clog/__init__.py new file mode 100644 index 0000000..0faf7a4 --- /dev/null +++ b/clog/__init__.py @@ -0,0 +1 @@ +from ._logger import Logger \ No newline at end of file diff --git a/clog/__version__.py b/clog/__version__.py new file mode 100644 index 0000000..2883328 --- /dev/null +++ b/clog/__version__.py @@ -0,0 +1,9 @@ +__title__ = "clog" +__description__ = "Logging as simple as putting on a shoe." +__url__ = "https://git.closedless.xyz/TheOnePath/clog" +__version__ = "0.1.0" +__author__ = "Ethan Smith-Coss" +__author_email__ = "ethan.sc@closedless.xyz" +__license__ = "GNU GPLv3+" +__copyright__ = "Copyright 2022 Ethan Smith-Coss" +__biscuit__ = "\U0001f36a" \ No newline at end of file diff --git a/_logger.py b/clog/_logger.py similarity index 99% rename from _logger.py rename to clog/_logger.py index 28cfaa5..816bd24 100644 --- a/_logger.py +++ b/clog/_logger.py @@ -4,8 +4,8 @@ from io import TextIOWrapper from typing import TextIO, Union from collections import namedtuple -from utils import common -from utils.printfmt import * +from .utils import common +from .utils.printfmt import * class Logger: ... # class delcaration diff --git a/utils/__init__.py b/clog/utils/__init__.py similarity index 100% rename from utils/__init__.py rename to clog/utils/__init__.py diff --git a/utils/common.py b/clog/utils/common.py similarity index 100% rename from utils/common.py rename to clog/utils/common.py diff --git a/utils/printfmt.py b/clog/utils/printfmt.py similarity index 100% rename from utils/printfmt.py rename to clog/utils/printfmt.py diff --git a/main.py b/main.py deleted file mode 100644 index 8a99324..0000000 --- a/main.py +++ /dev/null @@ -1,19 +0,0 @@ -if __name__ == "__main__": - import _logger - import time - - logger = _logger.Logger() - - logger.debug("This is a debug message").withConsole() - logger.warn("This is a warning message").withConsole() - logger.error("This is an error message").withConsole() - - logger.debug("A message to file but not TTY") - - msg = "Checking if 1 + 1 = 2..." - logger.debug(msg, end="\r").withConsole() - time.sleep(1) - if 1 + 2 != 2: - logger.error(msg + "failed.").withConsole() - else: - logger.debug(msg + "ok.").withConsole() \ No newline at end of file