Giter Club home page Giter Club logo

Comments (9)

finaldie avatar finaldie commented on June 3, 2024

Additional, add a stop interface may better than now, we can stop it first before fork.

from final_libs.

finaldie avatar finaldie commented on June 3, 2024

Stop thread of log system has some risk, so we can use sync-write mode before fork. :D

from final_libs.

finaldie avatar finaldie commented on June 3, 2024

For sync-write mode, we'll add a new interface flog_set_mode(int mode);

from final_libs.

finaldie avatar finaldie commented on June 3, 2024

Ok, here is the final changes list:

  1. Add new interface flog_set_mode(int mode). -- we can use it to control logging behavior, sync or async.
  2. Adjust thread noticing mechanism, using "eventfd" and "epoll" to finish push and pop action. -- That means, we can fetch data from queue of thread simply.
  3. Add a timer to control when we'll flush the cache to disk.

from final_libs.

finaldie avatar finaldie commented on June 3, 2024

Finish first version of new log system of using thread caching technology. Expect it'll more powerful. More testing will be continue.
On the other hand, I've fix some bugs of other modules during log system adjustment, such as "fev", "fhash", "fmempool".

from final_libs.

finaldie avatar finaldie commented on June 3, 2024

Most features has been completed, there are some action items next to do:

  1. Add log_set_buffer interface -- user will use this interface to custom their buffer size per thread
  2. Add log_register_event_xx interfaces -- when there are some event occur, log system will callback user function to do some notice or cleanup

from final_libs.

finaldie avatar finaldie commented on June 3, 2024

Above two feature has been checked-in.

from final_libs.

finaldie avatar finaldie commented on June 3, 2024

Need another important event -- LOG_EVENT_USER_BUFFER_RELEASED

By this event, we can monitor log system easily and quit safety. :D

from final_libs.

finaldie avatar finaldie commented on June 3, 2024

All done.

from final_libs.

Related Issues (20)

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.