All Projects → BNMetrics → Logme

BNMetrics / Logme

Licence: other
Python Logging For Humans (Also supports configurable color logging for the terminal!)

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Logme

Izumi
Productivity-oriented collection of lightweight fancy stuff for Scala toolchain
Stars: ✭ 423 (-22.53%)
Mutual labels:  logging
Logary
Logs and metrics are one! Professional logging, metrics and analytics for your apps.
Stars: ✭ 479 (-12.27%)
Mutual labels:  logging
Traceback with variables
Adds variables to python traceback. Simple, lightweight, controllable. Debug reasons of exceptions by logging or pretty printing colorful variable contexts for each frame in a stacktrace, showing every value. Dump locals environments after errors to console, files, and loggers. Works in Jupyter and IPython. Install with pip or conda.
Stars: ✭ 509 (-6.78%)
Mutual labels:  logging
Justlog
JustLog brings logging on iOS to the next level. It supports console, file and remote Logstash logging via TCP socket with no effort. Support for logz.io available.
Stars: ✭ 439 (-19.6%)
Mutual labels:  logging
Snoop
A powerful set of Python debugging tools, based on PySnooper
Stars: ✭ 467 (-14.47%)
Mutual labels:  logging
Faster
Fast persistent recoverable log and key-value store + cache, in C# and C++.
Stars: ✭ 4,846 (+787.55%)
Mutual labels:  logging
Log Process Errors
Show some ❤️ to Node.js process errors
Stars: ✭ 424 (-22.34%)
Mutual labels:  logging
Gear
A lightweight, composable and high performance web service framework for Go.
Stars: ✭ 544 (-0.37%)
Mutual labels:  logging
Oklog
Network logging interceptor for OkHttp. Logs an URL link with encoded network call data for every OkHttp call.
Stars: ✭ 474 (-13.19%)
Mutual labels:  logging
Logback Kafka Appender
Logback appender for Apache Kafka
Stars: ✭ 505 (-7.51%)
Mutual labels:  logging
Babel Plugin Sitrep
Log all assignments and the return value of a function with a simple comment
Stars: ✭ 442 (-19.05%)
Mutual labels:  logging
Api Boot
“ ApiBoot”是为接口服务而生的,基于“ SpringBoot”完成扩展和自动配置,内部封装了一系列的开箱即用Starters。
Stars: ✭ 460 (-15.75%)
Mutual labels:  logging
Zerolog
Zero Allocation JSON Logger
Stars: ✭ 5,642 (+933.33%)
Mutual labels:  logging
Riemann
A network event stream processing system, in Clojure.
Stars: ✭ 4,099 (+650.73%)
Mutual labels:  logging
Zentral
Zentral is an open-source solution for infrastructure monitoring and endpoint event stream processing. It provides build-in orchestration of macOS security components (Santa, Osquery, et-al.), event correlation and event management. It consolidates its features with various data store backends (ElasticStack, Azure Log Analytics, Splunk, et-al.).
Stars: ✭ 522 (-4.4%)
Mutual labels:  logging
Datasource Proxy
Provide listener framework for JDBC interactions and query executions via proxy.
Stars: ✭ 420 (-23.08%)
Mutual labels:  logging
Log4rs
A highly configurable logging framework for Rust
Stars: ✭ 483 (-11.54%)
Mutual labels:  logging
Logging Log4net
Mirror of This is the Apache log4net logging project git repository.
Stars: ✭ 544 (-0.37%)
Mutual labels:  logging
Fern
Simple, efficient logging for Rust
Stars: ✭ 524 (-4.03%)
Mutual labels:  logging
Logging
A flexible logging library for use in Ruby programs based on the design of Java's log4j library.
Stars: ✭ 495 (-9.34%)
Mutual labels:  logging

================================= Logme - Python Logging for Humans

.. image:: https://badge.fury.io/py/logme.svg :target: https://pypi.org/project/logme/

.. image:: https://travis-ci.org/BNMetrics/logme.svg?branch=master :target: https://travis-ci.org/BNMetrics/logme

.. image:: https://codecov.io/gh/BNMetrics/logme/branch/master/graph/badge.svg :target: https://codecov.io/gh/BNMetrics/logme

.. image:: https://readthedocs.org/projects/logme/badge/?version=latest :target: https://logme.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status

Logme is a Python package that makes logging simple and robust. If you have found logging in Python not so straight forward, download this package and give it a try! :)

V1.3.0 Updates

logme.ini file now supports custom datefmt and style! Thanks to @afunTW <https://github.com/afunTW>_ suggestion! :)

Here is an example of how you can specify these parameters in your logme.ini configuration:

.. code-block:: ini

[my_config]
level = DEBUG
formatter =
    fmt: {asctime} - {name} - {levelname} - {message}
    datefmt: %Y/%m/%d
    style: {
stream =
    type: StreamHandler
    active: True
    level: DEBUG
file =
    type: FileHandler
    active: True
    level: DEBUG
    formatter: {name} :: {funcName} :: {levelname} :: {message}
    filename: mylogpath/foo.log

Note: Only top level master_formatter supports parameters as shown above, individual handler formatter will not.

Terminal Color Output

logme supports color and styling output in the terminal!

The colors and style is customizable in logme.ini, here is a screenshot of how it looks like in the terminal:

.. image:: http://logme.readthedocs.io/en/latest/_images/demo_color.png

To use color output in logme, make sure your logme package and logme.ini is up-to-date <https://logme.readthedocs.io/en/latest/?badge=latest#upgrading>_ if you are using a version before 1.2.0.

Check the configuration details here <https://logme.readthedocs.io/en/latest/guide/quickstart.html#colors>_.

In A Nutshell

If you have a function you want to log, you can do this in your python file:

.. code-block:: python

import logme


@logme.log
def my_awesome_function(my_arg, logger=None):
    logger.info('this is my log message')
    """rest of the function"""

You can do the same with classes too:

.. code-block:: python

import logme


@logme.log
class MyAwesomeClass:
    def my_function(self, my_arg):
        self.logger.info('this is my log message')

pretty nice right? :)

To get started, head to the quickstart <https://logme.readthedocs.io/en/latest/guide/quickstart.html>_ page.

Installing Logme

::

$ pipenv install logme
✨🍰✨

Documentation

You can find the documentation at https://logme.readthedocs.io/en/latest/ . Give it a try!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].