Only this pageAll pages
Powered by GitBook
1 of 10

main

Loading...

Tentalog

Loading...

Loading...

Loading...

Loading...

ShellBin

Loading...

Loading...

Loading...

Logging with TentaLog 🦑

TentaLog is a logging library on top of the default logging library in Python.

We managed to integrate a simplier configuration-flow to ensure a quick integration in every app. You can configure your logging with a YAML file. A simple and light weight logging configuration is provided by default. We brought in this library our logging best practices ready to use with the default configuration.

Quick and dirty tentalog configuration

The Tentacle is the single unit of TentaLog, managing a single logger. To start logging with tentacle you can follow the quick-start guide on GitHub. This code will use the tentalog default configuration, that contains the configuration of two logging handlers, one for the console and one for a time based file rotation of 15 days. If the "mylogger" logger is not found in configuration, the "root" logger will be used and a warning message will be showed. If the name of the logger is not specified, the "root" logger will be used. If you want to use a custom configuration you can just initialize your Tentacle in a similar way with a YAML file.

We decided to release TentaLog as an open source project, in fact you can check and improve the code yourself: https://github.com/nextblu/tentalog

Installation

How to install TentaLog?

You can find TentaLog package on PyPi.

How to install

To install TentaLog in your environment you can simply type

pip install tentalog

This will install TentaLog in your sistem and you will be able to use the library in matters of second.

NextBlu

Docs, info and tutorial for every project running on NextBlu

NextBlu?

We are a group of developers, designers and planners based in Italy. We want to develop, improve and update the world around us. We are few, super busy and with great confidence in the Open Source world. In this wiki you can find guides, reflections and tutorials on how to interact with what we create.

What's that? ShellBin! 👩‍💻👨‍💻

What's the simplest and fasted way to share your stdout with other developers? Obviously ShellBin.

Here at NextBlu we often deal with very different environments, different technologies and different things to work on.. But do you know what we all have in common? Sooner or later we will have to open a terminal and share our information with the rest of the team.

Introducing ShellBin

ShellBin is a simple, fast and cool system where we share our internal bin.

We decided to create this open-source project to be able to create a quick and easy way to capture the result of our work.

ShellBin is available in two versions:

  • A CLI

  • Web version

Here you can find quick tutorials and informations about this project:

Let's use the web version 🕸️

Learn how to write, use and manage a bin in the web version.

ShellBin web, uh?

ShellBin web is a VueJS project that has the primary objective of allowing the sharing, creation and management of your bins.

How to I access the web version?

You can access the web version by clicking on the following link:

How do I create a Bin?

Scroll down, and locate the bin area. Here you can find this little badge where you can type your information and most importantly, paste your code.

Only the Code and the Language are required, but if you plan to share the bin with a friend a title and your name may make it look better.

Let's jump to the action, actual bin creation

After entering all the information you want to enter, you are ready to go: click on "Create a Bin".

Et voilà

You will be automatically redirected to the page with your bin, and now you can share the url with your friends or colleagues.

Let's use the web version 🕸️
The ShellBin CLI 🐚
This is what the home page looks like
The gateway to your bin.

A custom configuration

Explore sample configurations and explaination on how we manage our log

If you want to use a custom configuration you can just initialize your Tentacle in this way:

tentacle = Tentacle(path='myconf.yaml')

Yeah, but how the YAML looks like?

Here a quick look at default_configuration.yaml

version: 1
disable_existing_loggers: false

formatters:
  defaultFormatter:
    format: '%(asctime)s - %(filename)s - %(levelname)s - %(name)s - %(message)s'

handlers:
  console:
    class: logging.StreamHandler
    level: DEBUG
    formatter: defaultFormatter
  file:
    class: logging.handlers.TimedRotatingFileHandler
    level: INFO
    formatter: defaultFormatter
    filename: ./logs/log.log
    when: midnight
    interval: 15
    backupCount: 0

loggers:
  root:
    level: DEBUG
    handlers: [console, file]
    propagate: no

coloredlogs:
  active: true
  formatter: defaultFormatter

/*TODO ADD EXPL ON HOW TO CHANGE THE VALUES IN THE YAML FILE*/

Quick and dirty start

Learn how to use TentaLog in matters of second.

TentaLog has been designed to be used immediately after installation. We propose a basic configuration always available in order to have a logging system in few seconds.

So, where do we start?

The Tentacle is the single unit of TentaLog, managing a single logger. To start logging with tentacle you can do something like this:

This code will use the tentalog default configuration, that contains the configuration of two logging handlers, one for the console and one for a time based file rotation of 15 days. If the "mylogger" logger is not found in configuration, the "root" logger will be used and a warning message will be showed. If the name of the logger is specified, the "root" logger will be used.

from tentalog import Tentacle

tentacle = Tentacle(name='mylogger')

logger = tentacle.logger
logger.info("Hello World")
A quick and dirty configuration
ShellBin
Logo

The ShellBin CLI 🐚

Learn how to use the ShellBin CLI quickly

You can find the source code of ShellBin CLI here: https://github.com/nextblu/shellbin

This simple CLI program has been created in Vlanga simple yet powerfull programming language that we are experimenting.

How to install

You can simply download the client from this link: https://github.com/nextblu/shellbin/releases/tag/v1.0.5

After placing the executable in a folder of your choice you can symlink the executable for faster usage with the following code:

Unix*

mklink shellbin.exe "C:\<YOUR_DOWNLOAD_FOLDER>\shellbin.exe"

Windows

chmod +x ./shellbin
sudo ./shellbin symlink

How do I use it?

ShellBin is able to capture every stdout information, but be aware that sometime special char are not supported and can lead to a broken bin.

Simple! Just run something like that:

$ ls -la | shellbin

That's it! ShellBin will capture your stdout and upload the result to the online bin service.