Git Product home page Git Product logo

logfly's Introduction

logfly 2.4

a simple log tool by python.

position

log will create in ./logs/[folder_name]/[date] folder.
if use hidden, log will also appear in user/.1o9f1y folder.

How to

import

import logfly  

write_log

logfly.write_log('name', 'where', 'info', 'message', mode='add', folder_name='default-log', hidden='no', color='yes', str_message='yes')  

Description

name: (any str) logfile name, you can use diffrent string to create diffrent logfile.  
where: ('CLI', 'fileCLI', 'file') position where log appear.  
        fileCLI means log will appear in command line window and log file.  
        CLI means log will only appear in command line window.  
        file means log will only appear in logfile.  
info: (any str) custom log level, will upper and wrap with '[]'.  
message: (any str) log message.  
mode: ('add', 'new') default is 'add', means log will add in same day.  
        'new' means logfile will create when program every once.
folder_name: (any str) custom logfly folder name, default is 'default-log'.  
hidden: ('yes', 'no') default is 'no', means logfile will save a copy in user/.1o9f1y folder  
color: ('yes', 'no') default is 'yes', means log will with color.  
str_message: ('yes', 'no') default is 'yes', means log will print message with str()  

create_or_check_file

create_or_check_file(pathorfile, name, warning='yes'): 
    create or check file.  
    pathorfile: ('file', 'path') choose to create file or path.  
    name: (any str) file or path name.  
    if warning is 'yes', will print warning message if file or path is exist.  

Description

pathfile is the file path that you want to create, must fill with '//'  
filenname is the file name that you want to create, must is with '*.*'  

logfly's People

Contributors

yukikawas avatar

Watchers

 avatar

logfly's Issues

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.