Moved package modules into clog

All files related to the clog package have been moved into the directory
space "clog/" to separate project repository from package itself, and
allows for the building of the package tool via pip.

Added a __version__.py file to contain all important attributes about
the package.
This commit is contained in:
Ethan Smith-Coss 2022-05-03 23:28:44 +01:00
parent 19fb760fa9
commit 5da9e7990e
Signed by: TheOnePath
GPG Key ID: 4E7D436CE1A0BAF1
8 changed files with 12 additions and 25 deletions

View File

@ -1,4 +0,0 @@
from ._logger import *
from .utils.common import *
#from .utils.printfmt import *
from .utils import printfmt

1
clog/__init__.py Normal file
View File

@ -0,0 +1 @@
from ._logger import Logger

9
clog/__version__.py Normal file
View File

@ -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"

View File

@ -4,8 +4,8 @@ from io import TextIOWrapper
from typing import TextIO, Union from typing import TextIO, Union
from collections import namedtuple from collections import namedtuple
from utils import common from .utils import common
from utils.printfmt import * from .utils.printfmt import *
class Logger: ... # class delcaration class Logger: ... # class delcaration

19
main.py
View File

@ -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()