Code Monkey home page Code Monkey logo

aya's Introduction

Aya - Lightweight Logging Framework

Aya logo

About

Aya is a very lightweight logging suite with heavily customizable options like plugins and templates. Aya is still in a very early stage of development so please report all bugs to me to fix or open a pull request

Features

  • Custom logging templates
  • Verbose line-tracking logs
  • Logging to file
  • Colorful logging messages

Getting Started

import aya # make sure to import the whole module

mylog = Logger(template="{DATE} {TIME} {FILE}:{LINE} - {TYPE}: {MSG}", logfile="test.txt")
mylog.debug("This is a debug message")
mylog.info("This is a info message")
mylog.warn("This is a warning message")
mylog.error("This is an error message")
mylog.critical("This is a critical message")

# Default template and no logging to file
boring_log = Logger()
boring_log.debug("This is a boring debug message...")

See the docs folder for some more examples

Install

Sadly this project is not on pypi yet so you must manualy import it for now. Don't worry it's easy

git clone https://www.github.com/Ubuntufanboy/aya
cp aya/src/aya.py your/project/directory

Plugins

Plugin support has been added check it out in the docs/ folder. Bare in mind that the feature is still under development

Template Keywords

Input Keywords

{TIME} A timestamp of the time the log was called
{DATE} The day the log was called
{TYPE} The type of log that was called
{LINE} The line number that the log was called
{LOGFILE} The file the logger logs to
{FILE} The file that the logger is running on

Output Keywords

{msg} the message the logger will display

Contributing

Please feel free to contribute since the more hands the better! There are no set guidelines to contribute except verify your code works before making a project

aya's People

Contributors

ubuntufanboy avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.