Skip to main content

Logger

A simple and fask logging library that uses the power of mongodb to save and query logs (with built in cli)

Cli

# search
search <tag> <logger_name>
mongofastlogger search Info

# clear
clear <logger_name>
mongofastlogger clear

# log
log <tag> <message> <logger_name>
mongofastlogger log Info "This is a log message"

# view
view <logger_name>
mongofastlogger view

# export
export <filename> <logger_name>
mongofastlogger export filename.log

# last
last <metric> <amount> <logger_name>
mongofastlogger last hours 3

# help
find commands
python3 mongofastlogger

help with specific commands
mongofastlogger command --help

# other info
<logger_name> is optional and is 'logs' by default

Library

from mongofastlogger import LogViewer, Logger


# Make logger
logger = Logger()
# Log message with tag of "Something"
logger.log("Something", "This is bad as well i guess but i dont actually know")
# Log message with tag of "Something" and display log in console
logger.log("Something", "This is a message", display=True)

# Make Viewer
viewer = LogViewer()
# Print all logs
viewer.view_log()

# Search logs that have the tag "Something"
viewer.search_logs_by_tag("Something")
# Search logs in the last 3 days
viewer.check_by_time("days", 3)
# Export logs to example.log
viewer.export_log("example.log")

print("Production")

# Make logger with name
production_logger = Logger("Production")
production_logger.log("Error", "Critical error in production")

# Make viewer with name
production_viewer = LogViewer("Production")
production_viewer.view_log()

Todo

Make readme more easy to read, especially comments in code and command line instructions

Metadata

Release files for mongofastlogger 0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mongofastlogger 0.5
File Size Uploaded
mongofastlogger-0.5.tar.gz 3.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mongofastlogger 0.5
File Interpreter ABI Platform
mongofastlogger-0.5-py3-none-any.whl Python 3 none any Details

Total release size: 9.9 kB

Release files / mongofastlogger-0.5.tar.gz

Download URL mongofastlogger-0.5.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
ca9bd174e42bdc97abc997d065a3f9b0446c24ad8b186dc76141d07e4a9eeb9d
BLAKE2b-256 checksum
How to use checksums
6622e17a84a7eb9e1398705defcf451913a50f1e17ef22f3357349a52b27aa61
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/50.3.2 requests-toolbelt/0.8.0 tqdm/4.31.1 CPython/3.8.6

Release files / mongofastlogger-0.5-py3-none-any.whl

Download URL mongofastlogger-0.5-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
452e96f91ced89bcf678aea88d29ae93232406500201c4e199a68cf5356ab783
BLAKE2b-256 checksum
How to use checksums
778a07073b276fcc6a834d968e5c7c2a84ead641b5c008aa2cdebd8bfce21e59
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/50.3.2 requests-toolbelt/0.8.0 tqdm/4.31.1 CPython/3.8.6

Release history Release notifications | RSS feed

This release

0.5 This release

2 release files

0.4

2 release files

0.3

2 release files

0.2

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page