Skip to main content

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    
------------------------------------------------------------
loguru               7.675        130,297         89,888,890 bytes
Python logging       5.313        188,206         82,888,890 bytes
picologging          2.038        490,626         79,888,888 bytes
spdlog               0.199        5,034,527       79,888,890 bytes
NexusLogger          0.049        20,304,036      97,888,890 bytes
NexusLogger unix_ts  0.049        20,451,884      83,868,922 bytes
------------------------------------------------------------

NexusLogger is 4.03x faster than spdlog
NexusLogger is 41.38x faster than picologging
NexusLogger is 107.88x faster than Python logging
NexusLogger is 155.83x faster than loguru
NexusLogger unix_ts is 4.06x faster than spdlog
NexusLogger unix_ts is 41.69x faster than picologging
NexusLogger unix_ts is 108.67x faster than Python logging
NexusLogger unix_ts is 156.96x faster than loguru

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, *args)
logging.debug(message, *args)
logging.info(message, *args)
logging.warning(message, *args)
logging.error(message, *args)

Lazy %-style Formatting

Like the standard logging module, extra arguments are merged into the message with %-style formatting — but only if the log level is enabled. When the level is disabled, the arguments are never formatted (no str()/repr() calls), making disabled log calls nearly free:

logger.info("price=%s qty=%s side=%s", price, qty, side)
logger.debug("state=%r retries=%d", state, retries)  # zero cost at INFO level

Supported conversions: %s %r %d %i %f %e %g %x %o %%, plus the full % operator spec (width, precision, flags, %(name)s with a dict argument) with semantics identical to Python's message % args. Simple placeholders are rendered natively in Rust — formatting with args is faster than building the message with an f-string at the call site. A message logged without args is emitted verbatim, so literal % needs no escaping.

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

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.7.0.tar.gz (168.9 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.7.0-cp314-cp314-win_amd64.whl (225.8 kB view details)

Uploaded CPython 3.14Windows x86-64

nexuslog_lib-0.7.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (360.0 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ x86-64

nexuslog_lib-0.7.0-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (357.9 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ ARM64

nexuslog_lib-0.7.0-cp314-cp314-macosx_11_0_arm64.whl (326.8 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

nexuslog_lib-0.7.0-cp314-cp314-macosx_10_12_x86_64.whl (336.0 kB view details)

Uploaded CPython 3.14macOS 10.12+ x86-64

nexuslog_lib-0.7.0-cp313-cp313-win_amd64.whl (225.7 kB view details)

Uploaded CPython 3.13Windows x86-64

nexuslog_lib-0.7.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (360.3 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

nexuslog_lib-0.7.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (357.7 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ ARM64

nexuslog_lib-0.7.0-cp313-cp313-macosx_11_0_arm64.whl (326.7 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

nexuslog_lib-0.7.0-cp313-cp313-macosx_10_12_x86_64.whl (336.2 kB view details)

Uploaded CPython 3.13macOS 10.12+ x86-64

nexuslog_lib-0.7.0-cp312-cp312-win_amd64.whl (226.1 kB view details)

Uploaded CPython 3.12Windows x86-64

nexuslog_lib-0.7.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (360.8 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

nexuslog_lib-0.7.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (358.3 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64

nexuslog_lib-0.7.0-cp312-cp312-macosx_11_0_arm64.whl (327.2 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

nexuslog_lib-0.7.0-cp312-cp312-macosx_10_12_x86_64.whl (336.9 kB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

nexuslog_lib-0.7.0-cp311-cp311-win_amd64.whl (227.1 kB view details)

Uploaded CPython 3.11Windows x86-64

nexuslog_lib-0.7.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (360.4 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

nexuslog_lib-0.7.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (358.6 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64

nexuslog_lib-0.7.0-cp311-cp311-macosx_11_0_arm64.whl (326.3 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

nexuslog_lib-0.7.0-cp311-cp311-macosx_10_12_x86_64.whl (336.3 kB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: nexuslog_lib-0.7.0.tar.gz
  • Upload date:
  • Size: 168.9 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.7.0.tar.gz
Algorithm Hash digest
SHA256 9e9c6c6812f263a662d68f0c0a5c65573f830dcc5d6a3e6b178763c910bc87cf
MD5 a67e493029bfa0156e2a70344616f22e
BLAKE2b-256 0b1a39c15ef6ad799a29c483cb9426108589233304db24b134d29107271e68be

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nexuslog_lib-0.7.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 2bd9aa5eb104f65dfacc1da5b0c22e57af0562a5ba714e8eb9ceed457c65e02f
MD5 85c514eec893fc5b3f1a6dae4cb0d5f4
BLAKE2b-256 6eef3c028fa513da48fc39121695caa3d9879189510a9e6a5fb9734e60eaa3ef

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nexuslog_lib-0.7.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 45d892aafbea03acbb47aa8924da2f394b95e69b10933f7f03f0e94ac5bad824
MD5 d3fc5050dccb416b262f97cb2b30c3e5
BLAKE2b-256 1a2115d6a45a6f56069e27c705b634263bd6658893ea653d48733e342bede414

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nexuslog_lib-0.7.0-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 8ee6424458251d8f8dfcc29a3f9d48f7aeae380d6d6df0fe7d59164b2c48cb93
MD5 2168ebab7d630c8b9c86f86afdd9a50d
BLAKE2b-256 ea77b40def2f00cb471764722a13c95e0efb80d4cc9dd9f60ea8d0b5fd96f7d0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nexuslog_lib-0.7.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 13f59a139d430dd43376a19ead52c18ccaf86ae8891f00e40d277039a484408c
MD5 969faffc0084f3f9b8cc55cdc51a1a89
BLAKE2b-256 fc37846012a22b4aa20ef9d730556520a7ed84f1efb4def142f318d65ab72350

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nexuslog_lib-0.7.0-cp314-cp314-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 35c7a29ba395631f6b16583e14c281003132105f44625ddd7816bdfdf75b653f
MD5 6db427a1a2b9fcad31eac4198690e147
BLAKE2b-256 03842c4a4dd0b65e8604db2c2970998908a2cd4a8541d42f0461f5ce2585b4d5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nexuslog_lib-0.7.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 cbcf753cef32ef2d20c4962d027c81b060fec2a9f1a32395442ebcfd524cde59
MD5 77a9e43bf21a59631394c14103974f5e
BLAKE2b-256 2b40c3963eef36efb7dc757fc5e0a7aea2b068f2eb6a04d49da80576ad6756bd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nexuslog_lib-0.7.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3ed8d9e95b47a110eb8049d7f77495127c3c31c79c16a006edc109ccbfdc8e89
MD5 e0d77fbfe97be9a252111df3b240db2d
BLAKE2b-256 a3f1586bb5844f6c8bd13c33a5138738b77eb709f0bc950f2973b0b40a50a525

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nexuslog_lib-0.7.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f5e778b22e787e1170ab80c3cf050bc15fa4a5627c10852b4bd6aaf66bcabd6e
MD5 e24059c82b8892fe186eb88cd73a26c7
BLAKE2b-256 a9bd4491f6a3139dfa9f4c5c2f343bc7f0d694614fde4a8f2c8791516c8eb9c5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nexuslog_lib-0.7.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a75a4ec1882f27caa3a187dd9a61217e6a03ae96636c6c422779bfba26b19cfc
MD5 c79fe1927bd88da0fbc85866b68cb03a
BLAKE2b-256 b0f6d55cb5c6e9080897b468ea07c6496251675b3288ad5423c1bf7438596bc3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nexuslog_lib-0.7.0-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 93f6103341632d2a4e60708ecc16f5162baa3c2864bea8898d837773a09e3f61
MD5 e8fc652405ce89473f359867acc88cd7
BLAKE2b-256 27804ef06af1186531fe1080ba9ebc2f108a9fbe3666acbdc2fb64fc397239bf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nexuslog_lib-0.7.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 b3f7840deabdcef43f2766a3dd6cbb504a46904a0857db28b5f48f87e8ccd2c7
MD5 64f8ce87e1a3e0486578fa6891d50dce
BLAKE2b-256 353b0351a97edfa8888d768f4a7d1f26c3b17530807c2118badfbd2060dfd90b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nexuslog_lib-0.7.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e356cd0d60c0b56b0404b1fdb059604be33d7b552655e98cb241a811cd399d7c
MD5 08f8538973525d7ef04f955d634127be
BLAKE2b-256 d4649e49e689ba18f35c6638cde0b1db1333249896a08629970f6a4cf137095d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nexuslog_lib-0.7.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 515b173e2a8975586f653f87e54779757358f654321b80dac91760baadddbf0e
MD5 6212ea259e5498def64b145ee595904f
BLAKE2b-256 9d41f1fe89b3c94692abbccba392b081f3d776c3b70ef24e1143c08f7276f9f1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nexuslog_lib-0.7.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c605b9951c9a6d6165700470f4e6d9b3444f405084257b73c44cbef0fd3eb2c4
MD5 98391e2990716e9f21f920216d9bb7c0
BLAKE2b-256 b6f044e902c42b1eca8b59be0f2e424f9805dd0520bec02f680ff2226b7a0d4a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nexuslog_lib-0.7.0-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 182debd8a5e4fe4ad1bf29527fcf2261ecef4347ae066cbdb57df00ad38b5da2
MD5 8c35d2df55423dedde97481eccc2c2c8
BLAKE2b-256 7f358c6fa988fc3250070d026c1ed9b24efa29501cbb9a9e7902d693734fe6e3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nexuslog_lib-0.7.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 8a886456f124cc3b8ef01f748dfa753f549f6f40840aeb19efaa4b57c10d88ed
MD5 f796a9668111ec13ad0e02e2fdbd493b
BLAKE2b-256 a8f1d98328cdadcc1ffd97f4927d63ee408e3d5c3330d5e3f65f074d0417f51b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nexuslog_lib-0.7.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 029452ccf953fb749a919dc4ad01fcea6026baf66eb92eb6239a28f795da20e7
MD5 d1866c258fa2aae20e42b5e5dcbcfc41
BLAKE2b-256 d8521b24f50d2202e96488d360f87f1e4ccf8be1a56390bc64a2105413b2e6a4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nexuslog_lib-0.7.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 853cee55c85d340c955fdfb5b63f21af70247fbdd191107a9566628b53932dcf
MD5 2e8cc9c3b7f4d1b3c110e79f0d71be51
BLAKE2b-256 e0e3b19c51cee0b0c5fc20e42a88e3e8d694ac6762a9c2143c93e5624c75b813

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nexuslog_lib-0.7.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5ab3bd37cdbbb27c84aeb460710f5491cce777ff7765810864a241106fd6ff68
MD5 ce4fa96384be5b849d55e2f0c621461f
BLAKE2b-256 41c99dd42926cc4943f98956a0d60c3a2cbe41308513ba424f9f686fd554980c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nexuslog_lib-0.7.0-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 0ca5a24a84b60bd6067fb9f55a5711defb8fafd0f57fce606d7399d28d3c50d4
MD5 d47addd0a168ccd162016b3ab7eabd84
BLAKE2b-256 ffb8d0ffd2a2a226cbae3c60b80d8d02abcad9b4be32831619258b65cc445556

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 Sentry Error logging StatusPage Status page