Skip to main content

A simple logging.txt library

Project description

Text File Generation Module

This Python module provides a simple logging functionality, allowing users to generate text log files.

if not exist => create file.txt

- dir/
___ logFile.txt
___ logFile-1.txt
___ logFile-2.txt

coontent file :

[17/04/2024 09:56:05] [ERROR] this is a test message error dag
[17/04/2024 09:56:05] [INFO] this is a test info message index null
[17/04/2024 09:56:05] [WARNING] this is a test warning message scripte.py break

Usage

Once installed, you can import the module into your Python script like this:

from log import log_message

log_message("logFile", "error", "this is a test message")

Additional Examples:

  1. Logging an informational message:

    log_message("logFile", "info", "this is an informational message")
    
  2. Logging a warning message:

    log_message("logFile-1", "warning", "this is a warning message")
    
  3. Logging a debug message:

    log_message("logFile-2", "debug", "this is a debug message")
    
  4. Logging a critical message:

    log_message("logFile", "critical", "this is a critical message")
    
  5. Auto Log:

    log_message("auto", "debug", "this is a debug message")
    # name file = %d%m%Y_%H%M%S.txt
    

Cornelius Vincent @MIT @author

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

simply-log-0.2.6.tar.gz (2.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

simply_log-0.2.6-py3-none-any.whl (2.4 kB view details)

Uploaded Python 3

File details

Details for the file simply-log-0.2.6.tar.gz.

File metadata

  • Download URL: simply-log-0.2.6.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.5

File hashes

Hashes for simply-log-0.2.6.tar.gz
Algorithm Hash digest
SHA256 228120770bb0a142e9d6c2ba1a70de6c2afdba90d24660bf19bee7e0e524b3b3
MD5 29c721bff2a556cd7cd2a26c7c6203d6
BLAKE2b-256 ce3adf7c8313148d68e6e31b40ef5b760845e77fb21064f933dc902bb4a20c65

See more details on using hashes here.

File details

Details for the file simply_log-0.2.6-py3-none-any.whl.

File metadata

  • Download URL: simply_log-0.2.6-py3-none-any.whl
  • Upload date:
  • Size: 2.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.5

File hashes

Hashes for simply_log-0.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 8085e8dc3e9b12eee6b64b9ad6dcfcf93a47d666ec8e66309dbe4389174290f8
MD5 0f58a2a173fedeea93352092daa02a82
BLAKE2b-256 20a0e88aba06ee89878f21f583b583b45bbc39989164640defb2621866964cf7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page