Saravanan666/pypi-org huggingface dataset:
Package: log-config-watcher
Log Config WatcherThis library makes it easy to load a JSON formatted Python Logging configuration file
and monitor the file for changes. If the configuration has changed, and is valid, it will
automatically be applied and the changes will be reflect in your logging without restarting.Getting Startedfromlog_config_watcherimportLogConfigWatcherlog_watcher=LogConfigWatcher("config.json")log_Watcher.start()OptionsTheLogConfigWatcherclass using the Python logging system to setup abasicConfigbefore
attempting to load the config file. This way if there are any errors during the loading of the file
they will be reported somewhere. You can customize the defaults using the following settings passed
to the constructor.default_level: int - A Python logging logging level, such as, DEBUG, INFO, WARNIGN, or ERRORdefault_format: str - A Python logging format stringdefault_handler: logging.Handler - A Python logging Handler type, such as, StreamHandler, FileHandler, etc, etcDevelopmentThis project usesPoetryas its project manager.
The goal of this library is to have no external runtime dependencies.
However, for development, the following are used:Black - For Formatting the code baseiSort - For sorting importsautoflake - For removing unused imports and variablespoetry-bumpversion - For keeping the project and internal__version__value in syncIf you make a PR, you must run theformat.shscript or your PR will be rejected.
Package: logcontext
This module helps to solve the following problem:You have an async program. It does lots of things in parallel.
You don't really know what's happening. Then you get a deadlock,
or a cancellation whose initial trigger is masked by another error
or an unprotected async call within afinally:block.You now have no idea what's happening, and low-level instrumentation
of your code causes the error to get lost in the noise.Here's howlogcontextcan help.First, wrap your main code::from logcontext import main_context
def main():
	with main_context():
		... # whatever your program doesThen you wrap each possibly-interesting block, nursery, async context, …
withfrom logcontext import context_of
...
async def code_of_interest(arg):
	with context_of("interesting: %s", arg) as ctx:
	    ... # start some subtask

		# display what my subcontexts are doing, if anything
		ctx.log_tree()Text and positional arguments will be passed tologging.log.Reporting on the current state of your code is then as easy as::from logcontext import log_backtrace, log_tree

...
log_tree()  # reports the whole program's context tree
log_backtrace()  # reports the contexts leading to the current codeBothcontext_ofandlog_treeaccept a log level. This way you can
selectively attach higher log levels to possibly-interesting code.
"Uninteresting" subtrees are skipped."""from ._main import main_context, context_of, log_backtrace, log_tree
Package: logcontrol
logcontrol:A logger manager for Python programsIt provides:Centralized control of log level (per-group)Original use case:Python GUI program containing many packages and modulesEach source file that logs creates a proper logger for use within that filee.g. logger = logging.getLogger(__name__)This allows a good logging hierarchy for control at a central pointI wanted to simplify enabling debug level for specific packages or groupsInstallation:pip install logcontrol(Tested for Python >=3.6.5 on Linux (Ubuntu) and Windows 7/10)Usage:example (where otherpackage and anotherpackage are example names):# imports of fictitious packages
import otherpackage
import anotherpackage

import logging
import logcontrol

# Register loggers you wish to control.
# You can have user-friendly names for the groups if you wish:
logcontrol.register_logger(otherpackage.logger, group='Other Package')

# Set output file for the root logger:
logcontrol.set_log_file('main_log.txt')

# Enable specific log levels per-group:
logcontrol.set_level(logging.DEBUG, group='Other Package')

# Make specific groups log to console while debugging:
logcontrol.log_to_console(group='Other Package')

# You can even disable or enable propagation per-group:
logcontrol.disable_propagation(group='Other Package')
logcontrol.enable_propagation(group='Other Package')

# Loggers added to the same group will get the same configuration.
# This would automatically set DEBUG level and attach the console logging handler:
logcontrol.register_logger(anotherpackage.module.logger, group='Other Package')

# You can get a dict of group names with level names (good for populating a debug/log control popup):
logcontrol.group_level_names()

# For convenience, the predefined log levels are available:
#     - as integers via logcontrol.log_level_integers
#     - as strings via logcontrol.log_level_strings
#
# This makes it easy to display them in a combo box for users to choose.
Package: logcounter
##非堵塞日志实时统计,效果很牛逼Todo:push到websokock and highcharts`ruifengyun@bj-log:/data/scribe/spider$tailfspider-2014-11-06_00001|python~/counter.py Use Ctrl + C to terminate the program 0/0 (rps/min avg) 200/100 (rps/min avg) 52/84 (rps/min avg) 48/75 (rps/min avg) 126/85 (rps/min avg) 84/85 (rps/min avg) 69/83 (rps/min avg) 83/83 (rps/min avg) 42/78 (rps/min avg) 128/83 (rps/min avg) 128/87 (rps/min avg) 70/86 (rps/min avg) 91/86 (rps/min avg) 40/83 (rps/min avg) 150/87 (rps/min avg) 81/87 (rps/min avg) 103/88 (rps/min avg) 56/86 (rps/min avg) 65/85 (rps/min avg) 125/87 (rps/min avg) 85/87 (rps/min avg) 104/88 (rps/min avg) 55/86 (rps/min avg) 36/84 (rps/min avg) `
Package: log-count-util
log-count-utilsIntroduction & UsageSuppose we have an action log datadflikeuser_idtimestampexpense02021-02-18 10:00:0010002021-02-18 10:00:101002021-02-18 10:00:21102021-02-18 11:00:210.112020-02-18 10:00:1010012020-02-18 10:00:201012020-02-18 10:00:20112020-02-18 10:00:290Suppose that you have to compute the following quantityfor each row in this dataframe:the number of actions each user has taken within 10 secondstotal amount of expenses of a user within 10 secondsThe following naive way is fine for this tiny example but becomes costly (O(N^2)) for large data frame.fromdatetimeimporttimedeltaimportnumpyasnptd=timedelta(seconds=10)answers=[]foruid,time_pointinzip(df.user_id,df.timestamp):cnt=np.sum((df.user_id==uid)&(df.timestamp<time_point)&(df.timestamp>=(time_point-td)))answers.append(cnt)Ifdfis sorted (byuser_idas the primary andtimestampas the secondary key),
we can do this blazing fast (O(N)) usinglog_count_util.fromlog_count_utilimportfind_n_records_within_intervalanswers=find_n_records_within_interval(df.user_id,df.timestamp,df_user_id,df.timestamp,td)
Package: log-creator
Log_CreatorUnder construction! Not ready for use yet! Currently experimenting and planning!Developed by Nethan Quinn Jael (c) 2022How To Usefromlog_creatorimportLog#Create an Instancex=Log(file_name="optional.txt",file_directory="../<optional>")#Create a Log File and Directory to the Current Working Directoryx.create_log()#Write a Logx.write_log("Hello World")
Package: logdag
OverviewThis package generates causal DAGs among time-series events in syslog data.
This package works on python3.
The input log data is loaded with AMULOG (https://github.com/cpflat/amulog).
The output DAG is recorded in the format of NetworkX DiGraph.This project was partially forked from repository LogCausalAnaysis.
(https://github.com/cpflat/LogCausalAnalysis)UsageAll features are available from command line. First you should try following help commandpython -m logdag -h.short usage:Generate amulog database (and its config) as the input log time-series sourcePrepare logdag config file by referringlogdag/data/config.conf.defaultGenerate time-series db bylogdag.sourcefeaturesGenerate DAGs by subcommandmakedagSee results by commands such asshow-edge-listReferenceThis project is evaluated in some papersCNSM2019andTNSM2018.
If you use this code, please consider citing:@inproceedings{Kobayashi_CNSM2019,
  author = {Kobayashi, Satoru and Otomo, Kazuki and Fukuda, Kensuke},
  booktitle = {Proceedings of the 15th International Conference on Network and Service Management (CNSM'20)},
  title = {Causal analysis of network logs with layered protocols and topology knowledge},
  pages = {1-9},
  year = {2019}
}


@article{Kobayashi_TNSM2018,
  author = {Kobayashi, Satoru and Otomo, Kazuki and Fukuda, Kensuke and Esaki, Hiroshi},
  journal = {IEEE Transactions on Network and Service Management},
  volume = {15},
  number = {1},
  pages = {53-67},
  title = {Mining causes of network events in log data with causal inference},
  year = {2018}
}License3-Clause BSD licenseAuthorSatoru Kobayashi
Package: logdebug
logebugWith This Library  You can keep the log details and exception.version0.0.3Authors@RANJIT_MAITYReales Date06-12-2023BadgesAbout AuthorI Am Ranjit From INDIA, a Certified Data scientist , Data Engineer by professional  with hands-on experience of more than 2 year and 2months ,on ML> NLP> Data mining > Neural Networks > ModeL Deployment>ETL.
Give me raw data and I'll return you insights, problems to be rectified and enhancements to achieve the target. I am always on the lookout for new projects to work And
Am Always Happy â˜» To Play With DataLinks
Package: log-decor
IntroductionThis package contains decorators that provide logging functionality for functions
and methods.Exampleimportloggingfromlog_decorimportadd_logger,log_msg@add_logger()classExample:@log_msg('message',level=logging.DEBUG)deff1(self):pass@log_msg(level=logging.INFO)deff2(self):pass>>> logging.basicConfig(level=logging.DEBUG)
>>> example = Example()
>>> example.f1()
DEBUG:Example:message
>>> example.f2()
INFO:Example:f2()
Package: logdir
LogDirA Python library for managing logging directories.SourcePyPICondaCI/CDDocsDocs StatusGitHublogdir.btjanaka.netInstallationTo install from PyPI, run:pipinstalllogdirTo install from Conda, run:condainstall-cconda-forgelogdirTo install from source, clone this repo, cd into it, and run:pipinstall.logdir is tested on Python 3.7+. Earlier Python versions may work but are not
guaranteed.UsageIf your experiment is calledMy Experiment, you can create a logging directory
for it with:fromlogdirimportLogDirlogdir=LogDir("My Experiment")This will create a logging directory of the form./logs/YYYY-MM-DD_HH-MM-SS_my-experiment; you can change./logsby
passing in a second argument for the root directory when initializingLogDir,
i.e.LogDir("My Experiment", "./different-log-dir").You now have access to useful methods for creating files and saving data in the
directory. For example, start writing to a filenew.txtin the directory with:withlogdir.pfile("new.txt").open()asfile:file.write("Hello World!")This takes advantage of thepfile()method, which
creates apathlib.Pathto the new file. It also usespathlib.Path.open().pfile()will also create intermediate directories, so this will work even iffoo/bar/does not exist in the logging directory already:withlogdir.pfile("foo/bar/new.txt").open()asfile:file.write("Hello World!")There is alsosave_data(), which
saves data to a file. JSON, YAML, TOML, and pickle files are currently
supported.logdir.save_data({"a":1,"b":2,"c":3},"file.json")Finally,readme()adds
a README.md to the directory with multiple pieces of information. For instance,
this command:logdir.readme(date=True,git_commit=True)Will create something like:# My Experiment-Date: 2020-10-04 23:04:05-Git Commit: e3rftyt543rt5y67jhtgr4yhjuSee theAPIfor all available methods.
Package: logdispatchr
logdispatchrAn attempt at a simple syslog-compatible(?) log dispatcher and filter. For now, mainly a POC.Free software: MIT licenseDocumentation:https://logdispatchr.readthedocs.io.Featurestail a file ?send the log line on the network, using msgpack => DONEwrite somewhere else => DONECreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2016-08-23)First release on PyPI.
Package: logdriver
logdriverRun a socket server for application logging.
Implemented as a CLI. Receives pickled LogRecord objects over a socket,
buffers them, and handles them according to application requirements.InstallationpipinstalllogdriverExampleStartlogdriveron the command-line using default options. This will start the socket
server listening onlocalhoston port9079. It will use aStreamLoggerto log
all the LogRecords it receives tostdout, and set the logging level toWARNING.$logdriver
Startedlogdriverloggingsocketserver
Listeningforlogsonlocalhost:9079
PressCTRL+Ctoquit
StartingTCPserverIn your Python application, configure your logger to use aSocketHandler:importloggingfromlogging.handlersimportSocketHandlerhandler=SocketHandler("localhost",9079)logger=logging.getLogger(__name__)logger.addHandler(handler)logger.warning("Hello, world!")You should see the log getting printed by the socket server.
Package: log-dump
log-dumpThe Windows security log dumper.IntroductionLog-Dump is a Python script to dump and generate all Windows Logon Errors, primary the 4625 and 4771 events on Windows 2008 / 2012 Servers and 529 on Windows 2003 Servers.
With this tool, system admins can generate a CSV list with all information contained in the Windows Security Log about the erros, wich became easily to treat.InstallationInstall Log-dump.You can install the log-dump through pip:pip install log-dumpAs well, the sdist package can be downloaded at:https://pypi.python.org/pypi/log-dump/How to UseOnce Instaled, you just need run it with Elevated Privileges and provide a range of date, as noted in the following example(Considering that the scripts dir of the python instalation is part of the PATH):C:>log_dump.py -sd “30/01/13 20:00” -ed “31/01/13 20:00”A file named ‘logon_failure.log’ will be created at the current dir with all logon errors in the CSV format.LicenseLicensed under the Apache License, Version 2.0, that can be viewed at:http://www.apache.org/licenses/LICENSE-2.0Credits[Gabriel Abdalla Cavalcante](https://github.com/gcavalcante8808)
Package: loge
Loge - Easy and fast generation of interactive reports with PythonChangelogLoge 0.3.4 (beta stage)dxf file graphics displayinganastruct support addedembedding image from clipboardLoge 0.3.3 (beta stage)Greek letters added to code editorupdated to current pyqt5 versionmistune v1 version required - mistune 0.8.4 version specified in setup.pyLoge 0.3.1 (beta stage)synchronize scrolling optionsaving scrolls positionsask to save job when file is closingdon’t need save file to startfile browser addedLoge 0.2.3 (beta stage)editor addeduser interface updatedLoge 0.1.9 (alpha stage)first public releaseDescriptionLoge is a tool for crating dynamic reports with Python. Report source is written in python with some additional special syntax where you can define report content and format.InstallationMinimal Loge requirements:Python 3pyqt5mistunepillowOptional Loge dependencies (to make all Loge features available):unummatplotlibsvgvritepillowtabulatedxf2svganastructLoge is available through PyPI and can be install with pip command. To install Loge with minimal requirements use pip by typingpip install logeYou can install optional dependencies by taping:pip install unum matplotlib svgwrite pillow tabulate dxf2svg anastructTo run Loge use command:logePlease find more information about installing process at project website.LicenseCopyright (C) 2017-2022, the Loge development teamLoge is distributed under the terms of GNU General Public LicenseThe full license can be found in ‘license.txt’Loge development team can be found in ‘development.txt’About usThe development of Loge is coordinated by Lukasz Laba. See development.txt file for a complete list of people who helped develop Loge.ContributionsIf you want to help out, create a pull request or start a discussion in our group forum.More informationProject website:https://loge.readthedocs.ioGoogle group forum:https://groups.google.com/d/forum/python_logeCode repository:https://bitbucket.org/lukaszlaba/logeContact: Lukasz Laba <lukaszlaba@gmail.com>
Package: logedit
LogeditLogedit is a Python utility that auto-generates changelogs from git commits using OpenAI's APIs.InstallationYou can install Logedit from PyPI:pipinstalllogeditYou'll also need to set your OpenAI API key:exportOPENAI_API_KEY='your-api-key-here'UsageYou can specify the version, the path to the changelog file, the AI model, and whether to append the new entry to the original changelog file using the--version,--changelog,--gpt3, and--appendarguments, respectively:logedit--version[current_version]--changelog[changelog_file]--gpt3--appendThe--versionparameter can be used to specify both the old and new version in the formatold_version:new_version. If only the new version is provided, Logedit will get the most recent version tag in your git repository as the old version. If no new version is provided or "HEAD" is given, GPT-4 will try to infer the new version based on the changes found in the commits.The--changelogparameter is the path to yourCHANGELOG.mdfile.The--gpt3flag can be added to use the GPT-3.5 Turbo model for generating the changelog. If it's not provided, GPT-4 will be used by default.If--appendis provided, the new changelog entry will be automatically appended to the specified changelog file.If you're generating a changelog for version0.2with version0.1as the old version and yourCHANGELOG.mdis in the same directory, you would use the command:logedit--version0.1:0.2--changelogCHANGELOG.md--appendIf you only provide the new version0.2, Logedit will consider the most recent tagged release in your repository as the old version:logedit--version0.2--changelogCHANGELOG.md--appendShorter aliases-vfor version,-cfor changelog,-3for GPT-3, and-afor append are also available:logedit-v0.2-cCHANGELOG.md-3-aHow it WorksLogedit retrieves all commits between the old and new versions specified. It then uses OpenAI's GPT-4 (or GPT-3.5 Turbo, if specified) to summarize each commit.Next, it feeds the tail of your currentCHANGELOG.mdfile, the new version (or its best guess if not specified or "HEAD" is provided), and the commit summaries to the selected AI model and generates a changelog entry in the same format as your existingCHANGELOG.md.If the--appendoption is used, the new entry is automatically added to your changelog file.Change LogSeeCHANGELOG.md.ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.LicenseMIT
Package: logeer
使用方法importlogeeraslog# 日志输出到文件log.addLogFile("test")# 日志级别log.trace("trace log")log.info("info log")log.warn("warn log")log.debug("debug log")log.error("error log")log.success("success log")# 捕获异常@log.catchdefraise_error():raiseRuntimeError("run error")raise_error()log.success("我可以被执行，不会阻塞！")raise_error()
Package: log-enricher
log-enricherThis is a log enricher, useful for adding custom fields to log records.This was developed atGRIDfor use with our
python backend services and intended to emit structured logs.installationpip install log-enricherconfigurationlog-enricher.initialize_logging(...)configures thelogginglibrary and takes inenrichers, a list of
functions that return a dictionary. When a log message is sent, the enrichers are run automatically and their
output is added to the log message, if structured logging is enabled.Furthermore,initialize_logging()takes a list ofloggersto use, a switch to controlstructured_logs(JSON logs, default on), and alog_levelsetting.Logs will be output in a structured JSON format by default - ifstructured_logsisTrue-
or in a plain, console-friendly format ifstructured_logsisFalse.config exampleimportosfromlog_enricherimportinitialize_logging,Levelfromlog_enricher.enrichersimportEnricherclassUserContextEnricher(Enricher):def__call__(self)->Dict[str,Any]:user_context=get_user_context()return{"username":user_context.get("username")}extra_log_properties={"app_version":Config.APP_VERSION,"release_stage":Config.RELEASE_STAGE}defmain():initialize_logging(loggers=["uvicorn","sqlalchemy"],structured_logs=os.environ.get("STRUCTURED_LOGS",True),log_level=Level.INFO,enrichers=[UserContextEnricher(),lambda:extra_log_properties],)enrichersTo build a log enricher, make a subclass of Enricher, or Callable, and implement__call__(). Any method returning
a dict can be used to enrich log records. Seelog_enricher/enrichers.py. The key-value
pairs in the dict are added as attribute-value pairs to the log record. Of course, any method calls in the
enrichers need to  work in any subsequent context the logging system is called.
Package: logen-trace
Python 사용자를 위한 ‘로젠 택배’ 배송완료 확인 모듈입니다.
간단하게 송장번호를 목록으로 입력받아, 배송완료 여부와 완료시간을 알려줍니다.이용 중 발생한 문제에 대해 책임지지 않습니다.최초 작성은핑크퐁 북스토어에서 쓰기 위해 만들었습니다.설치pipinstalllogen-trace사용법배송 완료 확인송장번호를 넣고 배송이 완료 되었는지 확인합니다.fromlogenimportLogen# 로젠 택배에서 발급 받은 아이디와 암호가 필요합니다.(별도 연락)# 테스트용 아이디와 암호 제공되지 않고 있습니다.logen=Logen('{ 아이디 }','{ 비밀번호 }')invoices=['{ 송장번호1 }','{ 송장번호2 }','{ 송장번호3 }','{ .... }']res=logen.trace(invoices)printres# [#    {#        'invoice': '{ 배송완료된 송장번호 }',#        'datetime': '{ 배송완료된 시간(datetime) }'  # 서울 타임존이 적용 되어있습니다.#    },#    ....# ]송장번호 외의 정보로 정보 확인 등의 추가 기능은 기여 바랍니다.
Package: logentries-cli
Unmaintained:I’m no longer maintaining this package because I am no longer
using Logentries. If you want to continue its maintenance please contact me.Stream your logs from Logentries on the commandline. Provides thelogentriescommand which makes it easy to call theirDownload APIand pipe it around.Setting upInstall it:$ pip install logentries-cliFind your Logentries account key. At time of writing, this can be found at
Accounts->Profile and appears when you press the “Show” button:(Optional) store your account key in the environment variableLOGENTRIES_ACCOUNT_KEY. You could set this up in e.g. your bashrc. Your
other option is to always pass it tologentrieswith--account-key.Filter your logs! Run with the syntax:$ logentries <logset> <logname> [-f filter] [-s start] [-e end]Verbose help for the options is provided withlogentries-h.Examples$ logentries web nginxWith only the required arguments (logset and log) filled in, the last 20
minutes of messages from that log are downloaded. They are streamed so they
play nicely with other commandline utilities.$ logentries web nginx-fcode=500Passing aLogentries filtermeans that
fewer messages are downloaded and you can analyze faster.$ logentries web nginx-f'code=500'-s'1am'-e'5 minutes ago'A wide variety of date/time formats are supported for specifying the start and
end of the time period to fetch messages for, thanks to the awesomeparsedatetimeanddateutil.
Package: logentries-envs
AboutThe Logentries Python Handler does not provide a way to getTOKENfrom a environment variable. This is a simple project that gives you the
ability to have Logentries Token read from a Environment variable.InstallTo install this library, use the following command:pip installlogentries-envsUsageConsidering the following code on file cool_log.py#!/usr/bin/env pythonimportloggingfromleenvsimportLogentriesHandlerlog=logging.getLogger('logentries')log.setLevel(logging.INFO)test=LogentriesHandler()log.addHandler(test)log.warn("Warning message")log.info("Info message")sleep(10)Now, just set the envvar and you are good to go.$exportLOGENTRIES_TOKEN="1234-1234-1234-1234"$pythoncool_log.py