GithubHelp home page GithubHelp logo

banana-log's Introduction

Bananalog

Create Log file in python easily with fancy Color !!!!

Installation

pip install banana-log

Usage

1. Import Banalog

from bananalog.banana import Banana

2. Create logger object

logger = Banana()

3. Modified logger object

3.1 Add logtype and defined color

logger.type_color = {
  "Error": 'Red',
  "Warning": 'Yellow',
  "Assert": 'Magenta'
}

3.2 defined color for date and time

logger.set_date_time_color_format(date_color='Green', time_color='Blue')

3.3 set time format

logger.datetime_format = 'format_0' # 'format_0', 'format_1', ... , 'format_4'

Formats

  • format_0 dd/mm/yy

  • format_1 Textual month, day and year

  • format_2 mm/dd/yy

  • format_3 Month abbreviation, day and year

  • format_4 dd/mm

    3.4 All done Lets start Logging!!!!

  • Log with out log type

logger.log("LOG MESSAGE")
  • Log with log type
logger.log("LOG MESSAGE", "LOG TYPE")

Example OUTPUT

[24/12/2020][15:23:56][Warning]    FIRE!!!

banana-log's People

Contributors

wasinuddy avatar leomotors avatar

Stargazers

Korakot Chaovavanich avatar Teproanyx avatar  avatar  avatar

Watchers

 avatar

Forkers

thebeatles423

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.