Saravanan666/pypi-org huggingface dataset:
Package: logbuddy
Logging ModuleThis library can handle colored log-output and write directly into a logfile.Init#!/usr/bin/env python3

from logbuddy import logbuddy

log = logbuddy.log()LoglevelAt the moment there are a few loglevels defined by default.InfoWarningErrorPassDebuglog.Pass("I am a pass-message")
log.Warn("I am a warning-message")
log.Error("I am an error-message")
log.Debug("I am a debug-message")
log.Info("I am an info-message")Change the color of the levelslog.Info("I am an info-message")

log.setInfo("\x1b[1;36m")

log.Info("And now I have a different color")If you don't like colorslog.setColor(False)Need a logfile?log.setLogfile("somelogfile")Need a logfile with date?log.setLogfile("somelogfile")
log.setLogfileDate(True)Future PlansCreating your own loglevels
Package: logcabin
logcabin is a program for aggregating and processing events from a diverse range
of sources and formats, and outputting to the file system, database or a search
engine.QuickstartInstall:$ pip install logcabinConfigure:$ wget https://raw.github.com/artirix/logcabin/master/config/simple.py -O config.pyRun:$ logcabinSend some messages:$ echo '{"message": "test log event"}' | nc -u localhost 6000
$ cat output.logDependenciespip will install gevent, which needs libevent-dev (or equivalent package) to
build:$ apt-get install libevent-devAll other dependencies are optional, and only required if you use that module.zeromqInstall:$ apt-get install libzmq1-dev (or equivalent)
$ pip install -U pyzmq
(>= 2.2.0.1)mongodbInstall:$ pip install pymongoDocsSee:http://logcabin.readthedocs.org/en/latest/ContributingContributions welcome! Please:Fork the project on GithubMake your feature addition or bug fix, write tests, commit.Send me a pull request. Bonus points for topic branches.Changelog1.0.10Fix for breaking change in elasticsearch 1.0. fixes #4.1.0.9elasticsearch output: handle bad requests better. fixes #3.1.0.8Add examples to docs.1.0.7Add some debugging logging1.0.6Switch to milliseconds - more ISO8601 standard1.0.5Save precious bytes on json output1.0.4Improve error messages on unparseable JsonAdd some debug logging to Graphite1.0.3add copy action in Mutate object1.0.2Fix bug in when setting File statedir1.0.1Add resume to input File tailing1.0Add timestamp rolling to Output FileAdd url unescape filterAdd event setter and tidy docs0.1b12graphite output should reconnect on socket errors0.1b11Stats filter: zero=True/False option to generate zero data points0.1b10Add Python stage for custom python code0.1b9Yield in input stages for better behaviourImprove exception catching0.1b8Robustness and general bug fixes0.1b7Add support to stats for wildcarding and nested fields0.1b6Add index/type formatting for elasticsearch0.1b5Bug fix for flow stopping at If/SwitchAdd rename and unset to Mutate0.1b4Documentation improvements0.1b3Add file input and zeromq output.0.1b2Initial release
Package: log-call
log_calllibrary to log function or bond-method callsInstallationfor stable version
   - pip install log_call

for developement
   - git clone https://github.com/Agent-Hellboy/log_call
   - cd log_call
   - python -m venv .venv
   - source .venv/bin/activateExampleImport log_call from log_call and decorate your class or function with
itfromlog_callimportlog_call@log_callclassA:def__init__(self):passdefa(self,*args,**kwargs):passa=A()a.a(45,'str',s=34,g=43)@log_calldefc(a,*args,**kwargs):passc(34,56,p=23)response
2022-09-04 12:56:08,552 a called with {'args': [45, 'str'], 'kwargs': {'s': 34, 'g': 43}}
2022-09-04 12:56:08,552 c called with {'a': 34, 'args': [56], 'kwargs': {'p': 23}}ContributingPull requests are welcome. For major changes, please open an issue first
to discuss what you would like to change.
Package: log_calls
log_callsis a Python 3.3+ decorator that can print a lot of useful information
about calls to decorated functions, methods and properties. The decorator can
write tostdout, to another stream or file, or to a logger.log_callsprovides methods for writing your own debug messages, and for easily “dumping”
variables and expressions paired with their values. It can decorate individual
functions, methods and properties; but it can also programmatically decorate
callable members of entire classes and class hierarchies, even of entire modules,
with just a single line — which can greatly expedite learning a new codebase.In short,log_callscan save you from writing, rewriting, copying, pasting and
tweaking a lot of ad hoc, debug-only, boilerplate code — and it can keepyourcodebase free of that clutter.For each call to a decorated function or method,log_callscan show you:the caller (in fact, the complete call chain back to anotherlog_calls-decorated
caller so there are no gaps in chains displayed)the arguments passed to the function or method, and any default values usednesting of calls, using indentationthe number of the call (whether it’s the 1stcall,
the 2nd, the 103rd, …)the return valuethe time it took to executeand more!These and other features are optional and configurable settings, which can be
specified for each decorated callable via keyword parameters, as well asen
massefor a group of callables all sharing the same settings. You can examine
and change these settings on the fly using attributes with the same names as
the keywords, or using a dict-like interface whose keys are the keywords.log_callscan also collect profiling data and statistics, accessible at runtime,
such as:the number of calls to a functiontotal time taken by the functionthe function’s entire call history (arguments, time elapsed, return values, callers,
and more), available as text in CSV format and, ifPandasis installed, as aDataFrame.The package contains two other decorators:record_history, a stripped-down version oflog_calls,
only collects call history and statistics, and outputs no messages;used_unused_keywordslets a function or method easily determine, per-call,
which of its keyword parameters were actually supplied by the caller,
and which received their default values.NOTE: This package requires the CPython implementation, as it makes assumptions
about stack frame internals which may not be valid in other interpreters.See the documentation online athttp://www.pythonhosted.org/log_calls/,
or in the log_calls/docs/ directory, for usage, details, examples andtips und tricks.
Package: logcatdevices
Multiple ADB logcat with colored output / csv exportTested against Windows 10 / Python 3.11 / Anacondapip install logcatdevicesstart_logcat (ctrl+c to stop)StartsloggingAndroiddevicelogsusingADB.ThisfunctioninitiateslogcapturingforspecifiedAndroiddevicesusingADB(AndroidDebugBridge).LogsaresavedtoaCSVfileforfurtheranalysis.Args:adb_path(str):PathtotheADBexecutable.csv_output(str):PathtotheCSVfilewherethelogswillbesaved.device_serials(strorlist):Asingledeviceserialnumberasastring,oralistofserialnumbersformultipledevices.Serialnumbersareusedtoidentifyconnecteddevices.print_stdout(bool,optional):IfTrue,printslogmessagestotheconsole.DefaultisTrue.clear_log(bool,optional):IfTrue,clearsthedevicelogbeforecapturing.DefaultisTrue.ljustserial(int,optional):Left-justifiesthedeviceserialnumberintheprintedoutput.Defaultis16.Returns:NoneExample:fromlogcatdevicesimportstart_logcatandroidcsv="c:\\csvandroisad.csv"_=start_logcat(adb_path=r"C:\Android\android-sdk\platform-tools\adb.exe",csv_output=androidcsv,device_serials=["127.0.0.1:5565","127.0.0.1:7555","127.0.0.1:7556","emulator-5554","emulator-5564",],print_stdout=True,clear_log=True,ljustserial=16,)csv2dfConvertsaCSVlogfiletoapandasDataFrame.ThisfunctionreadsaCSVfilecontainingAndroiddevicelogdataandconvertsitintoastructuredpandasDataFrame,enablingeasydatamanipulationandanalysis.Args:csvfile(str):PathtotheCSVlogfile.Returns:pandas.DataFrame:ADataFramecontaininglogdatawiththefollowingcolumns:-aa_source(str):Sourceofthelogmessage.-aa_date(datetime):Dateandtimeofthelogmessage.-aa_processID(int):ProcessIDassociatedwiththelogmessage.-aa_threadID(int):ThreadIDassociatedwiththelogmessage.-aa_logType(str):Typeoflogmessage(e.g.,'V','D','I','W','E').-aa_tag(str):Tagassociatedwiththelogmessage.-aa_message(str):Logmessagecontent.Example:fromlogcatdevicesimportcsv2dfandroidcsv="c:\\csvandroisad.csv"df=csv2df(androidcsv)print(df.to_string())
Package: logcat-kernel-time-aligner
logcat-kernel-time-alignerWhen you get logcat, which including kernel log from an Android device.
The timestamp of kernel is not match to the others - main/system/radio.
This program helps replace the kernel timestamp to align the previous log (main/system/radio).UsageMake a logcat to have the "Kernel Time Fix"python KernelLogTimeAligner.py logcat.log > logcat_ktfix.log
Package: logcat-monitor
IntroductionThis is a tool class for use cases to find exception information in logcat in real time#Usage1. Importfrom logcat_monitor.logcat_monitor import LogcatMonitor2. Startlogcat_monitor = LogcatMonitor(serial_number, parent_folder, key_dict, rows)
logcat_monitor.start_monitor()LogcatMonitor parameters:serial_number: Serial number of the device, If only one device is connected, it can be set to Noneparent_folder: The directory where the file is stored. In this directory, a directory named "logcats" will be createdkey_dict: Keyword dictionary to find.{"ANR in ": "Anr",
 "FATAL EXCEPTION:": "Fatal",
 "signal 6": "Signal6",
 "signal 7": "Signal7",
 "signal 11": "Signal11",
 "CRASH: ": "Crash",
 "Force Closed": "ForceClose"}In dictionary, "Key" is keyword to find. "Value" must conform to Python's variable naming rules.After finding the corresponding problem, a file named "Value_%Y%m%d%H%M%S%f.txt" will be generated.rows:  After finding the problem, intercept the number of lines of logcat. Default is 100.3. Stoplogcat_monitor.stop_monitor()After stopping monitoring, a file named "statistics.txt" will be generated.Exampleif __name__ == '__main__':
    ...
    # Monitor logcat in real time
    logcat_monitor = LogcatMonitor(main_device.serial_number, parent_folder, key_dict={"E/ActivityManager": "Test"}, rows=50)
    logcat_monitor.start_monitor()

    ...
    
    logcat_monitor.stop_monitor()if __name__ == '__main__':
    ...
    # Filter existing logcat files
    logcat_monitor = LogcatMonitor()
    logcat_monitor.filter_file("logcat.txt")
Package: logcc
simple & beautiful log setup libraryNote: this package is still in alpha. Use with caution !QuickstartInstall logcc:pip install logccUse logcc:l=LogCC(name='test)l.update_color_formatter('name','DEBUG',red())l.update_color_formatter('name','INFO',cc(':blue::man::red::woman:'))log=logging.getLogger(name)log.debug('你好，世界')log.info('hello world')
Package: logchange
logchange - Changelog managerView, update and format your changelog anywhere!FeaturesKeeps your changelog inKeep a ChangelogstyleSupports version bumping fromsemverComes with a CLI toollogchangeRespects MarkDownCreated for CI and scriptsInstallationpython-mpipinstalllogchangeUsageCLISeeexamples/cli.shfolder.# create CHANGELOG.md if it does not exist# or reformat existing (please check changes manually)logchangeinit-f# add new releasecatNOTES_0.1.0.md|logchangeadd0.1.0# orlogchangeadd0.2.0-i`catNOTES_0.2.0.md`# update existing or create a new section in latest releaselogchangeaddlatestadded-i'New feature'# orlogchangeaddlatest-i'Added: New feature'# set unreleased sectionlogchangesetunreleasedfixed-i'Unreleased fix'# list released versionslogchangelist
<0.1.0
<0.2.0# check release notes sectionslogchangeget0.1.0added
<-Newawesomefeature
<-AnotherfeatureGitHub ActionsSeeworkflowsfolder.Versioninglogchangeversion followsPEP 440.Latest changesFull changelog can be found inReleases.ChangelogAll notable changes to this project will be documented in this file.The format is based onKeep a Changelog,
and this project adheres toPEP 440 -- Version Identification and Dependency Specification.[Unreleased][0.2.0] - 2021-03-14[0.2.0rc9] - 2021-03-14[0.2.0rc8] - 2021-03-14[0.2.0rc7] - 2021-03-14[0.1.2] - 2021-02-26[0.1.2rc2] - 2021-02-26[0.1.2rc1] - 2021-02-26Addedadded <text>CLI command to updateUnreleasedsectionchanged <text>CLI command to updateUnreleasedsectiondeprecated <text>CLI command to updateUnreleasedsectionremoved <text>CLI command to updateUnreleasedsectionfixed <text>CLI command to updateUnreleasedsectionsecurity <text>CLI command to updateUnreleasedsectionrelease <version>CLI command to moveUnreleasedsection to release notesChangedRelease notes can now have text other than keep-a-changelog entriesgetcommand no longer raises an error on non-existingCHANGELOG.mdAdded support for Python 3.6.10+FixedEmpty releases were not added to changelogCodeblocks are no longer removed from release notesIndented sections were not parsed properly[0.1.1] - 2021-02-26Initial release
Package: logchart
This tool generates a monitor report with charts from miscellaneous log files:JVM Garbage collector logging (gc.log)Java Virtual Machine logging (jvm.log)JBoss threads logging (webthreads.log)NuxeoDS Data source usage (nuxeo-ds.log)jmxstat output (jmxstat.log)Sysstat sar logging, cpu and disk activity (sysstat-sar.log)PostgreSQL logs (pgsql.log)PostgreSQL vacuum output (vacuum.log)View areport example.Requirementspythonpython-docutilsgnuplot >= 4.2 (with png support)sysstat sar, same version used during the monitor.pgFouine for PostgreSQL log and vacuum analysisOn Debian:sudo aptitude install gnuplot sysstat python-docutils pgfouineUsageThelogchart.pytool expects that all the logs are in the same
directory and produce a detail report:logchart.py [options] LOG_PATH REPORT_PATHThehudson.shscripts can be used from an hudson job to scan other jobs
and produces logchart monitor reports.How to setup monitoring on jboss/tomcatThe Nuxeomonitorctl.shscript generates all the logs.Here are some details on how to do it by hand.Garbage collector monitoriingUsing the jvm verbose:gc option:JAVA_OPTS="$JAVA_OPTS -Xloggc:$JBOSS_HOME/server/default/log/gc.log  -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps"Disk and systeme monitoringUsing sysstat sar utility, just run something like:sar -d -o $JBOSS_HOME/server/default/log/sysstat-sar.log 5 720 >/dev/null 2>&1 &This will monitor the activity every 5s during 1h.JBoss logging monitorCheck documentationhttp://doc.nuxeo.com/display/KB/Monitoring+Nuxeo+DMJMX loggingUsingjmxstat:jmxstat localhost:1089 --contention  "Catalina:type=Manager,path=/nuxeo,host=localhost[activeSessions]"  > jmxstat.log 2>&1 &PostgreSQL monitoringVisit the pgFouine tutorial to setup properly your PostgreSQL instancehttp://pgfouine.projects.postgresql.org/tutorial.htmlFor instance log only request slower than 100ms:log_min_duration_statement = 100PostgreSQL vacuum analysisJust catch the vacuum output:vacuumdb  -fzv database-name &> vacuum.log
Package: log.client
log.client一款Python日志客户端，支持直接写入Elasticsearch。v1.2.2:新功能1、支持通过环境变设置日志组件配置v1.2.1:新功能1、支持ElasticSearch最小安全性设置。v1.1.1:功能优化：1、支持批量写入Elasticsearch（依赖Elasticsearch包）。2、增加日志队列慢的异常处理。Usage:1、创建配置文件config.ini:[log]app_name=YOUR-APPNAMEes_urls=http://es-ip:9200es_index_name=applog-20221228# 1.2.1版本新增配置es_username=elastices_password=searchapp_name: 应用名称es_urls: Elasticsearch 地址。填写多个时，用,分隔。es_index_name: Elasticsearch 索引名称1.2.2 支持同名的环境变量替换config.ini.优先使用环境变量的设置.
linux:
export app_name=testapp
export es_urls=http://es-ip:92002、创建配置文件logging.ini:[loggers]keys=root[handlers]keys=consoleHandler,qHandler[formatters]keys=simpleFmt,detailFmt[logger_root]level=DEBUGhandlers=consoleHandler,qHandler[handler_consoleHandler]class=StreamHandlerlevel=DEBUGformatter=detailFmtargs=(sys.stdout,)[handler_qHandler]class=qlog.logger.QlogHandlerlevel=INFOformatter=simpleFmtargs=()[formatter_detailFmt]format="%(asctime)-15s %(levelname)s %(filename)s %(funcName)s lineNo: %(lineno)d details: %(message)s"[formatter_simpleFmt]format="%(message)s"3、日志写入测试importloggingimportlogging.configfromtimeimportsleeplogging.config.fileConfig('logging.ini')logger=logging.getLogger('root')logger.info('这是一条中文字符测试日志')logger.info('this is a info log.')logger.warning('this is a warning log.')sleep(30)4、查看Elasticsearch日志
Package: logcollect
Python library for centralized log collectingProvides simple configuration for collecting python logs to ELK stack
via RabbitMQ.Supported message flow is following:python.logging
      ||
      \/
  logcollect
      ||
      \/
   RabbitMQ
      ||
      \/
   Logstash
      ||
      \/
 ElasticSearch
      ||
      \/
    KibanaMechanicsNative logginglogcollect.boot.default_configensures that root logger has
correctly configured amqp handler.Djangologcollect.boot.django_dict_configmodifiesdjango.conf.settings.LOGGINGto ensure correct amqp handler for root
logger. It should be called in settings module after LOGGING definition.Celerylogcollect.boot.celery_configadds signal handler forworker_process_initsignal, and after that adds amqp handler totask_loggerbase handler. If necessary, root logger can be also
attached to amqp handler.Tips for configurationLogstashinput{rabbitmq{exchange=>"logstash"queue=>"logstash"host=>"rabbitmq-host"type=>"amqp"durable=>truecodec=>"json"}}output{elasticsearch{host=>localhost}stdout{codec=>rubydebug}}logcollectAll boot helpers have same parameters:broker_uri - celery-style RabbitMQ connection string, i.e.amqp://guest@localhost//vhostexchange, routing_key - message routing info for RabbitMQdurable - message delivery modelevel - handler loglevelactivity_identity - dict with “process type info”Activity IdentityAssuming we deployed two projects on same host: “github” and “jenkins”.
Both have web backends and background workers. Activity identity helps
to identify messages from these workers:ProjectWorkerActivity identitygithubbackend{"project": "github", "application": "backend"}jenkinsbackground{"project": "jenkins", "application": "background"}loggernamecould be used for separating different parts of code
within a worker. Hostnames and process PIDs are added automatically.Correlation IDNot supported yet, but idea is marking log messages about same object
with ID information about this object.ExamplesNative python loggingpythontest_native/native_logging.pyDjangopythontest_django/manage.pytest_logCeleryFirst, start worker:celeryworker-Atest_celery.app.celeryThen send a task to that worker:pythontest_celery/send_task.pyRelated worksAMQPHandler and AMQPLogstashFormatter are copied frompython-logstash.See also: *RabbitMQ*Logstash*Kibana*Django*Celery
Package: log-color
LogColorWhen making command line interfaces, it's often useful to colorize the output to emphasize salient pieces of
information or otherwise enhance the user experience. Unfortunately it's quite cumbersome to add colorized outputs to
Python log messages.ColorFormatterThe ColorFormatter is a logging formatter that parses your log messages and adds color codes to the log messages.ColorStripperThe ColorStripper formatter is the inverse of the ColorFormatter. It strips the color information from your messages so
that you can log to a file without it being full of color codes.InstallationI'm on pypi!$ pip install log_colorFeaturesSimple to useNo external dependenciesCompatibility with Python 3.7+, PyPyFast! Compiled binaries are available for some systems!http://no-color.org/LogColor honors theNO_COLORenvironment variable.
Package: logconf
logconfSetting up logging in Python is verbose and error prone. This library aims to fix that, without replacing the standard library logging entirely.importloggingfromlogconfimportglobal_logconfwithglobal_logconf()aslogger:# simple example:logger.log_to_console_if_interactive(level=logging.DEBUG)ifos.getenv('LOG_DEST'):# can be "stdout" or "stderr"logger.log_to_file(os.getenv('LOG_DEST'),level=os.getenv('LOG_LEVEL'))# more fine-grained control:logger.log_json_to_file('/var/log/myapp.jsonlog',level=logging.WARNING)logger.log_json_to_file('/var/log/myapp_debug.jsonlog',level=logging.DEBUG)# configure sub-loggers:withlogger.logger('urllib3')assublogger:sublogger.level=logging.WARNINGwithlogger.logger('myapp.security')assublogger:sublogger.log_to_file('/var/log/myapp.security.log',level=logging.INFO)
Package: logconf-dsl
A DSL for configuration of Python’sloggingmodule.InstallationFrom PyPI withpip:pipinstalllogconf-dsldirectly from git, withpip.pipinstall-egit+git@github.com:joar/logconf.gitUsageimportlogconffromlogconf.dslimportLogger,Handlerlogconf.configure(handlers=Handler('default','logging.StreamHandler',level='DEBUG'),root=Logger(level='ERROR',handlers=['default']),loggers=[Logger('foo','DEBUG',handlers=['default'])])
Package: log-config
Provide a function for anyone who want to configure log parameters easily, just call init_log_config when your app start up, the you can use the module of logging which build-in python3 without any other configtur. This module support ConsoleHandler, RotatingFileHandler and SMTPHandler and You can change the configuration parameters according to your requirements.MetaAuthor: Wu CharlesEmail:wcadaydayup@163.comMaintainer: Wu CharlesEmail:wcadaydayup@163.comStatus: active development, stable, maintained[![Version](https://img.shields.io/pypi/v/log_config.svg)](https://pypi.python.org/pypi/log_config)
[![GitHub](https://github.com/wcadaydayup/log_config.svg?branch=master)](https://github.com/wcadaydayup/log_config)InstallationSimply run the following from within a virtualenv:$ pip install log_config

or

$ pip install git+https://github.com/wcadaydayup/log_configUsageImport the log config function in anywhere you want use logging which build-in Python3:from log_config.log_config import init_log_configCall init_log_config() when your application start up, of course you can modify log file path, log level and so on by import other variable from log_config.log_config:init_log_config()Log confiture is ready, you can use logging module without any other configture:import logging
    logger = logging.getLogger()
    logger.debug("this is a message of debug level.")Then, you will see you output message in console and log file which in your current directory:configure_installed_apps_logger(logging.INFO, verbose=True, filename='django-project.log')You can also receive email notify if call init_log_config(use_mail=True), of course you should provide correct email parameters:import log_config.log_config as lf
    lf.EMAIL_HOST = "xxx.smtp.com"
    lf.FROM = "youraccount@xx.com"
    lf.TO = "a@xx.com;b@xx.com"

    ...

init_log_config(use_mail=True)
Package: log-configurator
logging configuratorSimple configurator for the python logging package that allows simultaneous file and shell logginginstallationThere are no PyPI releases. Neither are they planned.manualFor manual installation with pip directly from this GitHub repository simply open a terminal and typepip install git+ssh://git@github.com/rlipperts/logger.gitsetup.pyTo automatically install the logging configurator with your python package include these lines in your setup.pyinstall_requires = [
    'logging-configurator @ git+ssh://git@github.com/rlipperts/logger.git@master#egg=logging-configurator-0.0.2',
],Make sure you update the version in theegg=logging-configurator-...'portion to the correct version specified in the logging-configurators setup.py. This might not work if you plan on publishing your package on PyPI.usageImport the package and the default python loggingimportlog_configuratorimportloggingConfigure python logginglogging_configurator.setup_root_logger()Create a logging instance in your module as usual and log with itlogger=logging.getLogger(__name__)logger.info('Log Horizon')buffer initial outputIf you need more complex argument parsing before you can configure the logger you can buffer it and have it logged once you configure your logger.initial_log=logging_configurator.buffer_log()logger=logging.getLogger(__name__)logger.info('Early log information')# <your setup code goes here>logging_configurator.setup_root_logger()logger.debug(initial_log.getvalue())The early log output currently can only be logged with one severity level.