Giter Site home page Giter Site logo

melchisedech333 / log-viewer Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 734 KB

:hammer: Solution to receive log and debug messages from applications that do not have access to standard input and output. Like Linux Daemons, fork() processes and any similar application. Messages are sent through Non-Blocking Socket, and received in an Electron application.

License: BSD 3-Clause "New" or "Revised" License

CSS 8.02% HTML 14.76% JavaScript 34.86% Shell 0.74% C 41.62%
debug debugger debugger-visualizer debugging debugging-tool debugging-tools log-viewer log-visualization log-visualizer child-process

log-viewer's Introduction




Language: PT-BR

When you're implementing things like Linux Daemons, or any application where you don't have access to the standard IO, it's nice to have an application to receive messages from your program.

This is exactly what this application does, it connects to a TCP server on port 1337 (you can edit the port and destination IP address in the file example/debug.h).

In order not to crash the application when sending messages, Non-Blocking Socket techniques are used.

If my code has helped you, please consider sponsoring me ๐Ÿ’™


๐Ÿ’ป Usage example

Just add the debug.h header in your application, and use it as shown in the code below.


#include "debug.h"

int main (int argc, char *argv[])
{
    /**
     * Detailed message example.
     */
    say_debug_detail("Iesus Hominum Salvator!");

    /**
     * Example of common usage.
     */
    
    for (int a=0; a<10; a++) {
        say_debug("Message %d: Iesus Hominum Salvator!", a);
        sleep(1);
    }

    return 0;
}

To use the message visualization application (as shown in the image above), just open it using Electron. Remembering that the Electron version used is 19.0.0, and you can find it here: https://github.com/electron/electron/releases/tag/v19.0.0

All you need to do is run Electron, and specify the application directory in its parameters.

electron .

๐Ÿ˜ƒ Author

Sponsor: melchisedech333
Twitter: Melchisedech333
LinkedIn: Melchisedech Rex
Blog: melchisedech333.github.io


๐Ÿ“œ License

BSD-3-Clause license



Remember to give me
a beautiful little star ๐Ÿคฉ

log-viewer's People

Contributors

melchisedech333 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.