GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - kactlabs/logplus: Log Better

BranchesTags
Open more actions menu

Latest commit

 

History

9 Commits
9 Commits

Folders and files

NameName
Last commit message
Last commit date
logplus
logplus
 
 
.ant
.ant
 
 
.gitignore
.gitignore
 
 
HISTORY.rst
HISTORY.rst
 
 
LICENSE
LICENSE
 
 
README.rst
README.rst
 
 
requirements.txt
requirements.txt
 
 
setup.py
setup.py
 
 

Repository files navigation

LogPlus

Log Better

  • Free software: MIT license
  • Documentation: TBD

Installation

To install LogPlus:

pip install logplus

or

pip install git+https://github.com/tactlabs/logplus.git

Pip installing the library from local repository:

conda activate <env_name>

python setup.py install develop

Usage

To use LogPlus in a project:

import logplus

Sample

Example

import logplus

logger = logplus.get_logger()

result_json = {
    'result': 1,
    'a' : "two",
    'b' : {
        "one" : "two"
    }
}

logger.info('message test')
logger.info(result_json)
logger.debug('message debug')
logger.warning('message warning')
logger.error('message error')

Output

2024-05-12 16:29:28 info [~/projects/logger-base/test.py:28][startpy] message test

2024-05-12 16:29:28 info [~/projects/logger-base/test.py:29][startpy] {'result': 1, 'a': 'two', 'b': {'one': 'two'}}

2024-05-12 16:29:28 debug [~/projects/logger-base/test.py:31][startpy] message debug

2024-05-12 16:29:28 warning [~/projects/logger-base/test.py:32][startpy] message warning

2024-05-12 16:29:28 error [~/projects/logger-base/test.py:33][startpy] message error

Credits

The base code is derived from StructLog (https://github.com/hynek/structlog).
As we see a lot of improvement in StructLog we came up with this library.

About

Log Better

Resources

Readme
MIT license
Activity
Custom properties

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.