Skip to main content

Fast async logger with Python bindings

Project description

NexusLog

License Python Version

High-performance async logging library, compatible with Python standard logging API.

中文文档

Benchmark

Benchmark chart

Benchmarking with 1,000,000 log messages

------------------------------------------------------------
Logger               Time (s)     Msgs/sec        Log size    
------------------------------------------------------------
Python logging       5.237        190,954         82,888,890 bytes
loguru               7.039        142,070         89,888,890 bytes
picologging          1.999        500,306         79,888,882 bytes
spdlog               0.298        3,358,706       79,888,890 bytes
NexusLogger          0.131        7,654,750       97,888,890 bytes
NexusLogger unix_ts  0.127        7,874,086       82,888,890 bytes
------------------------------------------------------------

NexusLogger is 40.09x faster than Python logging
NexusLogger is 53.88x faster than loguru
NexusLogger is 15.30x faster than picologging
NexusLogger is 2.28x faster than spdlog
NexusLogger unix_ts is 41.24x faster than Python logging
NexusLogger unix_ts is 55.42x faster than loguru
NexusLogger unix_ts is 15.74x faster than picologging
NexusLogger unix_ts is 2.34x faster than spdlog

Installation

pip install nexuslog

Quick Start

import nexuslog as logging

logging.basicConfig(level=logging.INFO)

logging.info("Hello, world!")
logging.warning("This is a warning")
logging.error("This is an error")

API

Log Levels

logging.TRACE
logging.DEBUG
logging.INFO
logging.WARNING
logging.ERROR

Module-level Functions

logging.basicConfig(filename=None, level=logging.INFO, unix_ts=False)
logging.basicConfig(
    level=logging.INFO,
    name_levels={"db": logging.DEBUG, "http.client": logging.WARNING},
)
logging.trace(message)
logging.debug(message)
logging.info(message)
logging.warning(message)
logging.error(message)

Logger Class

from nexuslog import Logger, Level

logger = Logger("myapp", path="/var/log/app", level=Level.Info)
logger.info("message")
logger.shutdown()

getLogger

import nexuslog as logging

logging.basicConfig(filename="/var/log/app.log", level=logging.DEBUG)
logger = logging.getLogger("myapp")
logger.info("message")

License

MIT

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

nexuslog_lib-0.5.0.tar.gz (166.4 kB view details)

Uploaded Source

Built Distributions

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

nexuslog_lib-0.5.0-cp314-cp314-win_amd64.whl (216.1 kB view details)

Uploaded CPython 3.14Windows x86-64

nexuslog_lib-0.5.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (388.0 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ x86-64

nexuslog_lib-0.5.0-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (388.9 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ ARM64

nexuslog_lib-0.5.0-cp314-cp314-macosx_11_0_arm64.whl (340.9 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

nexuslog_lib-0.5.0-cp314-cp314-macosx_10_12_x86_64.whl (343.3 kB view details)

Uploaded CPython 3.14macOS 10.12+ x86-64

nexuslog_lib-0.5.0-cp313-cp313-win_amd64.whl (216.0 kB view details)

Uploaded CPython 3.13Windows x86-64

nexuslog_lib-0.5.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (388.7 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

nexuslog_lib-0.5.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (389.3 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ ARM64

nexuslog_lib-0.5.0-cp313-cp313-macosx_11_0_arm64.whl (341.1 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

nexuslog_lib-0.5.0-cp313-cp313-macosx_10_12_x86_64.whl (343.4 kB view details)

Uploaded CPython 3.13macOS 10.12+ x86-64

nexuslog_lib-0.5.0-cp312-cp312-win_amd64.whl (216.3 kB view details)

Uploaded CPython 3.12Windows x86-64

nexuslog_lib-0.5.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (389.2 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

nexuslog_lib-0.5.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (389.2 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64

nexuslog_lib-0.5.0-cp312-cp312-macosx_11_0_arm64.whl (341.2 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

nexuslog_lib-0.5.0-cp312-cp312-macosx_10_12_x86_64.whl (343.7 kB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

nexuslog_lib-0.5.0-cp311-cp311-win_amd64.whl (217.8 kB view details)

Uploaded CPython 3.11Windows x86-64

nexuslog_lib-0.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (390.3 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

nexuslog_lib-0.5.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (391.4 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64

nexuslog_lib-0.5.0-cp311-cp311-macosx_11_0_arm64.whl (343.3 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

nexuslog_lib-0.5.0-cp311-cp311-macosx_10_12_x86_64.whl (345.2 kB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

File details

Details for the file nexuslog_lib-0.5.0.tar.gz.

File metadata

  • Download URL: nexuslog_lib-0.5.0.tar.gz
  • Upload date:
  • Size: 166.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nexuslog_lib-0.5.0.tar.gz
Algorithm Hash digest
SHA256 b34b2dd6aa7df68bf775a08bb4952693772bd4a3675de53b3d3eb066433dc209
MD5 1a3ff70875dcd015e62fe3d8c990189d
BLAKE2b-256 96d622bf27c75ddbddb63aa77ca243ae94c63b4ead8fbf666bb5811ada7a9bbf

See more details on using hashes here.

File details

Details for the file nexuslog_lib-0.5.0-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for nexuslog_lib-0.5.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 2bc88024a825de2c9c20f9bc7d2ae2ad9934de071f7ea7d046b06d6c6181d843
MD5 af0536b3da39b833780210ccb190ee72
BLAKE2b-256 7ece650b1a2cb2e44609e74d37ab8fe6da8a846ca8f25b550b8a83cf0d959e43

See more details on using hashes here.

File details

Details for the file nexuslog_lib-0.5.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for nexuslog_lib-0.5.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a64f6e8836117d8395665814f78ef153b2c89752f92bff96981e5e0a7301c6b1
MD5 021504c0440ad615c17dcc93f40704f0
BLAKE2b-256 b18f355288392b50e38a569266e42d6da784ee541ce7a15c6d24fe9990aacb95

See more details on using hashes here.

File details

Details for the file nexuslog_lib-0.5.0-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for nexuslog_lib-0.5.0-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 66fb5b81f343c1d48508e21e0f82e36f1b64fdfabf562051c1d58b2d3b616889
MD5 cb3ae8acb430658040998d1ebb2b451e
BLAKE2b-256 67a31ad2a8c33f526bfb637ef9c8ae55e0e57e5b4c340565f76f09c242f021d9

See more details on using hashes here.

File details

Details for the file nexuslog_lib-0.5.0-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for nexuslog_lib-0.5.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 dea50bd6043a2f1e7be61c6379d4d835116310f8ff5820c719854c167a646d76
MD5 95f5585efba51c7fcd56f352dbd84bee
BLAKE2b-256 e19dd8b9aceb0fef32c1997497bdc3c1b5955040e979ab2959653ab75eabe84a

See more details on using hashes here.

File details

Details for the file nexuslog_lib-0.5.0-cp314-cp314-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for nexuslog_lib-0.5.0-cp314-cp314-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 d3274c7aa44acf10cc5bb02286200fccc5620785912d89e1e4adf1316f999186
MD5 9b3da457d63100fcce1c6c7682781ed8
BLAKE2b-256 3352639953777b6d606038270ce52eb508c735a9b7ddd1d89dd8c8ac948a492f

See more details on using hashes here.

File details

Details for the file nexuslog_lib-0.5.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for nexuslog_lib-0.5.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 68626cd852abe885bccb640121f7d9b01d36d51fc8ba5ab8d0b90016824f0325
MD5 37b3e79a3d28f4fc93581bf55b68a4af
BLAKE2b-256 417c96d831aba716a32275332af8bef6aede2178bc006403ea5faf9af8dab201

See more details on using hashes here.

File details

Details for the file nexuslog_lib-0.5.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for nexuslog_lib-0.5.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 66946a88a3530cbe296d5e24a7e1f4cc06edd56eb7191dc014bceaf5eafd1d8e
MD5 06978222b059c2700be9002684762ca3
BLAKE2b-256 fc693805a6518020eaffa5914211cc0ac61074c7780d41d3036bbdeee2bb30a2

See more details on using hashes here.

File details

Details for the file nexuslog_lib-0.5.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for nexuslog_lib-0.5.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 0270fbc1f65ac2d06a68db4cba17d843c32c673819a6cb62e765168975118e89
MD5 e76ab4401b447048ec6f83acb346e25c
BLAKE2b-256 7c648a34bc9d35d4d5edac593d6a039d36c1edc1668a27b3cfe5d565ee89b734

See more details on using hashes here.

File details

Details for the file nexuslog_lib-0.5.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for nexuslog_lib-0.5.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 46dea249188f2fd1e9585d55c4f2525977b11d8b627ce6dd398fa6c00c5e6490
MD5 e416ba5f047eded4ff0f97dba0bf0bc4
BLAKE2b-256 765eb30183a094b4dbf98d30b2f000013046b4ecee75a922dcaa73f43a169a1f

See more details on using hashes here.

File details

Details for the file nexuslog_lib-0.5.0-cp313-cp313-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for nexuslog_lib-0.5.0-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 ea56a69a2bdcc77e51fc84d293469bd1b1554deeb2cba1bdabe818e2c6e65ee6
MD5 b6f79baeb8046470cb4f3cc8ffd15ab1
BLAKE2b-256 b381518e23a65e2cfd001b4d69e5c07a1c99d672fcca88d78a82385472c7cab8

See more details on using hashes here.

File details

Details for the file nexuslog_lib-0.5.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for nexuslog_lib-0.5.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 51b9a69b01ca9362a30ba45152983081b497129bd7217ea36297d7a78bad4119
MD5 1da48f65d2cb51a114f40482eed04591
BLAKE2b-256 3cac2faf872506c8990bf21105d1da995501ed051b43990dec1ef83303681876

See more details on using hashes here.

File details

Details for the file nexuslog_lib-0.5.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for nexuslog_lib-0.5.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ec9e340384f3043f47f9d3c109ee0b9a36f698ea0d4f8e7a070bb8aa163c1bdd
MD5 a9fb82942a8b2da20aea4b0881c881ef
BLAKE2b-256 78233a22aa7186fbcc45267c9ff8ccffa7498167a8d50b12eedd99b918a6c017

See more details on using hashes here.

File details

Details for the file nexuslog_lib-0.5.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for nexuslog_lib-0.5.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 74ec9afeb129818224a87575b31fdd6dcc49e410e813a00a22c63c6dcd847fff
MD5 1a58a92a9e607c3f2809a1ed4442cf9d
BLAKE2b-256 89ceb4f5ff9e3ec6ccfb90d8ae51f0c39a4fa13cba39b81b1758c1d8b79ecc4a

See more details on using hashes here.

File details

Details for the file nexuslog_lib-0.5.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for nexuslog_lib-0.5.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 68416b3683f0cd3e4d664d100cc737a320eefb5995134a25e310f62e1dc6bc9a
MD5 591c4f1b60596e8953da895535021847
BLAKE2b-256 bc137e55f1d044ccb1d538b36ee5513e910011c57bd26fa24bd75f5c1a01f607

See more details on using hashes here.

File details

Details for the file nexuslog_lib-0.5.0-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for nexuslog_lib-0.5.0-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 dac170063bc9a51749d10c11a0023cfb59adfad9d3b39a32ad75f671c0f4b7a0
MD5 38c6291bb18dc7a5439d179bd3560dcd
BLAKE2b-256 0a3ab985c8584b589bef3c35f418191d2e22be9983862bd58b40104b155b1d9c

See more details on using hashes here.

File details

Details for the file nexuslog_lib-0.5.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for nexuslog_lib-0.5.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 294c3c2b581db144e08d9730d36fdcaefe04a43d3c527fac92fe67f5fd9f1f50
MD5 8e99ba62132d820d86c6b1b9dbfface3
BLAKE2b-256 7767559aa9e1f7c75278f70652f7865fa59cf43bb17c956396beb400227ddaf2

See more details on using hashes here.

File details

Details for the file nexuslog_lib-0.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for nexuslog_lib-0.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 46b5188420d9638bb01e8ffa1584f2619ea172cd952bd3eacad9747c90f17cf0
MD5 330ff1650da5cf85c7e1092aafe2743d
BLAKE2b-256 ed141438b5c049ebb4e66398adad3e0fde55d0286970bd8ab15187c876a05050

See more details on using hashes here.

File details

Details for the file nexuslog_lib-0.5.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for nexuslog_lib-0.5.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 93fec3fdba9bab76a42a7ff97e0c61e484b3c2d97ba4f216331dfc39276fbf8c
MD5 5d6ad398148cf0255c36f205e47ebc51
BLAKE2b-256 6ecf3dade020d75c902211e0dab3f8ea188b3d605d6b9a98e45b5cc398087a9b

See more details on using hashes here.

File details

Details for the file nexuslog_lib-0.5.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for nexuslog_lib-0.5.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8b21ab244a2b9c2c140c66138244ee074f042577a0a2d37cb1284f6a9dca9ba0
MD5 9951ddd973469fcb603903e07bb8eb57
BLAKE2b-256 46dad43e4c668964f898e7715f827137d18cb87bc9cf75f156dba53fa5c39daf

See more details on using hashes here.

File details

Details for the file nexuslog_lib-0.5.0-cp311-cp311-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for nexuslog_lib-0.5.0-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 65ab39bbdbf7c4718d38c7e0772febd9e3a9802a27bdb31d42340a25bd9e9982
MD5 8a243defcfabe61145b938e7d1eb4e09
BLAKE2b-256 086369ee44f07e5d4f63fddcb3c46d8bf25183af8c4e4dd421d86636345546c6

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