Giter Site home page Giter Site logo

qdeslandes / yall Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 0.0 5.71 MB

Subsystem based C logging library.

Home Page: https://naccyde.github.io/yall/

License: MIT License

CMake 3.18% C 66.18% C++ 1.90% Python 3.13% Shell 0.75% Perl 24.63% Dockerfile 0.22%
c log

yall's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

yall's Issues

Empty the log files on each application run

Remove file in create_subsystem(), add a flag in struct yall_subsystem to find out if the file should be deleted on create but do not use it now (subsystem creation will be to heavy will this flag).

Improve custom function call system

  • C++ version ?
  • Buffer size ? Let the caller define its own buffer size through malloc
  • Carriage return ?
  • Indent each line
  • Possibility to add text on the first line

Change library license

Current license is GPLv2. The problem is that a closed sources project could not use the library, which is blocking. The currently most appropriate license is MIT.

Count references to the library

A problem occurs if a client closes yall before the other client have finished :

A: yall_init();
B: yall_init();
B: yall_close();
A: YALL_ERR(); -> Library is closed !

Refactor header generation

Header format should be customizable to allow different configurations, in a printf manner :
\s :: \d :: \f : will generate <subsystem> :: <date> :: <function> as header.

Create message queue to avoid locking

Create a lock free message queue which avoid locking the console or the file.

  • This queue must be emptied on closing.
  • Add message when writer thread is closed.

TODO :

  • Write unit tests

Set fixed size for subsystem name

appTest ::: NOTICE :: main :: 2017-01-26 17:45:47 : Starting application...

Set fixed name length for subsystem name ("appTest" here). The style of the generated output should be better.

Create a log viewer

Create an application which will read a log file and a configuration, and show the subsystems tree and each log message.

Create a MSVC12 build

TODO :

  • Build Criterion (unit testing) for MSVC 12 : failed. Boxfort which is a depedency of Criterion does not support MSVC < 14
  • Run MSVC 12 build on AppVeyor

Create a "default" subsystem in case of error

This subsystem will be defined inside the library and will be used in case of error, if a requested subsystem is not found. It should log data from debug to emerg in a specific file.

Replace subsystems linked list

The subsystems linked list is not the best way to manage the subsystems as it triggers cache misses when the library try to retrieve a subsystem. Using a plain array would be better, but we have to keep the subsystems hierarchy intact.

Issue #42 would work on the same parts of the code.

Callback functions

Implement callback function for each subsystem, on each log level.
This will allow to call a specific custom function on each subsystem log for each log level (to open a confirmation popup for example).

UPDATE : This a more an "Error management" feature, than a "Logging" feature. It is currently out of scope.

Rewrite README.md

Clean README.md, set only useful informations and write library documentation inside the GitHub wiki.

Show message line on log output

Instead of :
appTest ::: EMERGENCY :: main :: 2017-01-27 15:41:51 : ApplicationManager failed to initialize
get :
appTest ::: EMERGENCY :: main:186 :: 2017-01-27 15:41:51 : ApplicationManager failed to initialize

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.