LogKontrol and the No Borders Software Project
I'm pleased to announce the launch of my No Borders Software Project with my release of my first module on PyPi! While LogKontrol is a really humble and simple logging library, it's a stepping stone towards my larger goal of sharing free software with all people with no borders.
LogKontrol
LogKontrol is a python library for flexible and configurable logging capabilities across different modules of a python application. It supports file and console logging, with easy customization through a YAML configuration file. It uses a singleton in order to have access to a single instance of the logger throughout your codebase and allows you to flexibly create categories of log messages that route to whichever files you choose to configure in the YAML file.
Installing LogKontrol (as of version 0.2.2) is as easy as pip install logkontrol You can also clone the repository and install it directly from the source: git clone https://github.com/voidfemme/logkontrol.git cd logkontrol pip install . To use LogKontrol, you import the module, initialize the logging system, and you're set to go.
from logkontrol import (
LogKonfig,
log_message,
log_variable,
log_function_call,
log_json_content,
)
Initialize the logging system
log_konfig = LogKonfig()
log_konfig.init_logging()
Log a simple message
log_message('general', 'Hello, world!')
If you have only one category of messages configured in your YAML file, you can simplify the log to:
log_message(message='Hello, world!')
and it will default to the only category available.
To log a function call
def some_function(param1, param2, param3):
log_function_call(
'general',
'some_function',
param1=param1,
param2=param2,
param3=param3,
)
...
To log a variable
log_variable('general', 'message (e.g. variable name)', variable)
to log json content (Either a dictionary, or a list of dictionaries)
log_json_content('general', json_content)
Go to the page on github for more details!
While the module simple and honestly incomplete, I'm planning on enhancing it with added features, and I'm still ironing out the actual api so that it's as easy to use as possible. All of the above information is subject to change, but major changes will be announced here as well as on github as time goes on. I've never tried to maintain packaged software before so this is a learning experience for me, and if things go well, then it will be the first program in my No Borders Software Project!
The No Borders Software Project
The No Borders Software Project was basically something I cooked up while considering different open source licenses and their implications for my software. I want to approach open source software from an anarcho-communist lens, and take the concept of "no borders" to the digital realm, rejecting IP and the capitalist system that it was built to uphold.
I do believe in and affirm and stand in solidarity with artists, creators, and software developers who must rely on IP in order to sustain their existence in the broader capitalist landscape as it stands.
Therefore, I have released my software to the public domain, enabling free use, modification, and distribution, thereby dismantling barriers to knowledge and democratizing access for all. While I alone cannot make a significant impact, I warmly invite fellow radicals to join me in this endeavor, creating a robust suite of software for mutual aid, freely available to everyone without conditions.
Furthermore, I do not claim exclusive rights to the 'No Borders Software Project' label. I encourage anyone releasing their software to the public domain to adopt this label and stand in solidarity with this movement.
I'm looking forward to maintaining this project and releasing subsequent projects in the future, so please go star my projects on github and look for more releases of free and open source software without borders!