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 - omers/logpacks

BranchesTags
Open more actions menu

Latest commit

 

History

22 Commits
22 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
logpacks
logpacks
 
 
tests
tests
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 

Repository files navigation

Logpack

Logpack is a simple logging package designed to handle application logging with additional capabilities to obfuscate sensitive information. This package provides a Logger class that can be used to log messages at various levels (info, warning, error) and redact sensitive information such as IP addresses, Social Security Numbers (SSNs), credit card numbers, and dates of birth.

Features

  • Log messages at different levels: info, warning, error.
  • Obfuscate sensitive information in log messages.
  • Configurable logging format.
  • Output logs to a specified file or standard output.

Installation

To install Logpack, clone the repository and install the dependencies:

git clone https://github.com/yourusername/logpack.git
cd logpack
pip install -r requirements.txt

Usage

Basic Usage

from logpacks.logger import Logger

# Initialize the logger
logger = Logger()

# Log messages
logger.log_info("This is an info message.")
logger.log_warning("This is a warning message.")
logger.log_error("This is an error message.")

Obfuscating Sensitive Information

The logger automatically obfuscates sensitive information in log messages. For example:

message = "User entered SSN: 518-03-0001"
logger.log_info(message)
# The logged message will be: "User entered SSN: [REDACT]"

Custom Log File

By default, the logger outputs to app.log. You can specify a different log file:

logger = Logger(log_file="custom.log")

Running Tests

To run the tests, use pytest:

pytest

About

No description, website, or topics provided.

Resources

Readme
Apache-2.0 license
Activity

Stars

1 star

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402792 — 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.