Code Monkey home page Code Monkey logo

Comments (5)

hhblaze avatar hhblaze commented on July 4, 2024

Logs everything?

from dbreeze.

thecodrr avatar thecodrr commented on July 4, 2024

@hhblaze Sorry, I mean a logger that logs all operations. All operations include:

  1. When inserting a single record.
  2. When inserting in bulk.
  3. And so on.

To sum "logs everything": Everything that is happening under-the-hood. Like transactions being opened, tables being searched, tables being opened, a value being fetched etc.

Of course, you will say we can implement it on the client-side but I am talking about the inner logger i.e. a logger that logs the internal workings like:

Engine is operable. Opening transaction...
[Transaction opening logs here...]
Transaction opened.
Starting TextSearch. Keyword: "something"
and so on...

Of course, this will take quite a bit of time but this will help loads when debugging and finding out exactly where the transaction failed.

from dbreeze.

hhblaze avatar hhblaze commented on July 4, 2024

This will slow down the complete db, more of it, it should not be a point of a user interest, what is under the hood. If transaction fails, then there is a bug in the code or in DB. It must be fixed and db should go on further.

from dbreeze.

thecodrr avatar thecodrr commented on July 4, 2024

It is not a point of user interest but rather a point of Developer interest. The Log goes back to the developer, he looks through it and finds out where the problem and fixes it. Simple.

I wonder why all the big and state-of-the-art database and applications implement "Loggers". As for the performance issue, I think if you use a good logger the normal speed 200,000 read/writes per second (which limit a logger never reaches). A single write would take 2ms at most.

But you won't have to worry about actual writing to a file (that job will fall to the developer using DBreeze). What your job would be is to expose an Interface that would write all the logs in air until a file-writer is implemented by the developer. Think of it as making a lot of strings.

If transaction fails, then there is a bug in the code or in DB. It must be fixed and db should go on further.

You did not understand what I said. If the transaction fails, there will be something about the error in the log file. When a developer will analyze that, he will know what. Debuggers are not available to app users, No Exception is displayed to them. The app just crashes. To fix those bugs, it would be critical to utilize the logger.

from dbreeze.

hhblaze avatar hhblaze commented on July 4, 2024

That is the scenario:

your program actions //log it if necessary
try
DBreeze transaction is open //do nothing
program actions //log it if necessary
DBreeze actions //do nothing
program actions //log it if necessary
DBreeze actions //do nothing
DBreeze commit //do nothing
DBreeze transaction is closed //do nothing
catch(ex)
//log definitely exception and if it is about DBreeze - show it to DBreeze dev team

program actions //log it if necessary

from dbreeze.

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.