Skip to main content

Logs the app

Project description

Logging functions for log the application info and errors.

Whenever you do:

# pyinstaller, making executable without console

pyinstaller --windowed --onefile your_app.py

Your app not save/display errors, crashes without any info.

This is for that, log the errors to logs folder.

So user send logs to YOU, and you can fix the issues.

Usage:

Don't forget file_path=file to know which file logged the info or module just log itself

from log import *
file = __file__
log("This is an info message.", file_path=file)
log("This is a warning message.", detail="WARNING", file_path=file)
log("This is an error message.", detail="ERROR", file_path=file)
try:
    hello
except Exception as e:
    log(str(e), detail="error", file_path=file)

# full log info from exception object:
try:
    1 / 0
except Exception as e:
    loged = get_error_log(e)
    log(loged, detail="ERROR", file_path=file)

# or use SimpleLog class for no always file_path parameter:
logger = SimpleLog(file_path=__file__)
logger.info("This is an info message.")
logger.warning("This is a warning message.")
logger.error("This is an error message.")
try:
    hello
except Exception as e:
    logger.detailed_error(str(e))

Licence:

MIT License

Copyright (c) 2025 Erkhemee

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Additional info (may you have to know it)

FAQ:

  • Where is log saved? The log is in folder logs, on same location of file that created. Logs sorted by date.

Creators:

Ericwasepic127 Ericwasepic127's logo

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

log_the_app-1.0.0.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

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

log_the_app-1.0.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file log_the_app-1.0.0.tar.gz.

File metadata

  • Download URL: log_the_app-1.0.0.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for log_the_app-1.0.0.tar.gz
Algorithm Hash digest
SHA256 810e1bfd400225d01e47e831dbe3bcf85124be34181e7973716f55159e68811b
MD5 0a90cb6cad93f76ac249bbb27215a3d6
BLAKE2b-256 ea6fe3a0694b8b94b89e73b276cead34f29de75df97bc50a30fbbcc31bd2f6ad

See more details on using hashes here.

File details

Details for the file log_the_app-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: log_the_app-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for log_the_app-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fa1ab98c256da0a08ec88e1bdc129709d357152398e9f0bfd9c409be3c68bfde
MD5 ac41eb6f0ba663092c58233adf649ce9
BLAKE2b-256 8b6aca7e690b67c467f3d7c1834dd409b32bac1b7a9fc8f1bd9a752a17927e99

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