Giter VIP home page Giter VIP logo

llcpp's People

Contributors

arbmind avatar blapid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

llcpp's Issues

context of logging

Very nice idea. I know you want to prove your point of faster "binary logging". But I think this extension fits much better here than any other logging framework.

As background: I ran into the issue that at positions where errors occur the context that lead to this issue is out of focus.

For example I migrate multiple databases and multiple tables. But a column data type does not match to the current database provider. But when I tell the user "yeah this data type does not work" he needs the context which column, which table and which database the error refers to.

The idea is, that I store context information to the log, but those are only written once a log message is written.

The "very stylized" usage might look like this:

void migrate_database(auto database) {
  logger.context("migrating database %s", database.name);
  for (auto table : database.tables) migrate_table(table);
}
void migrate_table(auto table) {
  logger.context("migrating table %s", table.name);
  for (auto column : table.columns) migrate_column(column);
}
void migrate_column(auto column) {
  logger.context("column %s", column.name);
  auto sql_type = to_sql_type(column.type);
}
auto to_sql_type(auto type) {
  // … else
  logger.error("wrong sql type");
}

The log may look something like this:

error: wrong sql type
context: column xyz, migrating table users, migrating database example

Or the context is only set once

context: migrating database example
context: > migrating table users
context: > > column xyz
error: wrong sql type
context: > > column abc
error: wrong sql type
context: > migrating table products
context: > > column price
context: wrong sql type

I hope you get what I mean. What do you think?

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.