Skip to content

Pythagorous-Studios/logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ptgstu-logger

A custom, dependency free, logging solution developed for use in Pythagorous Studio Software and wherever the standard library is unavailable, like a graphing calculator.

Here's a demo of a standard client side implementation of logger

import logger

displog=True #set displaying inbound logs to true

logger.register(__name__) #add our script as a registered in/out box
print(logger.regclis) #print out all registered clients

def log(msg,lvl=0):
    """wraper for the logger library"""
    logger.inlog(msg=msg,lvl=lvl,src=__name__) #send our message for processing
    if displog==True:
        print(logger.outlog(__name__)) #if displaying of logs is enabled print out the new messages
    else:
        pass

log("hello")
print(logger.intstack) #view the internal debugging stack log
log("ello")

This project actually works and is more or less feature complete. This might very well be a first for me! :D

Will give the following output

[('main', '__main___oblbl')] #all registered clients [('main', 0, 'hello')] #Our first message ['registered: main', "src: main found in list: [('main', '__main___oblbl')]", "src: main found in list: [('main', '__main___oblbl')]", 'sent message stack to source: main'] #The internal debug stack log [('main', 0, 'ello')] #our Second message

About

A custom dependency free logging solution developed for use wherever the standard library is unavailable.

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages