Giter VIP home page Giter VIP logo

trace-client's Introduction

A client library for communicating with Ayxia Trace

Synopsis

This is an implementation of the Ayxia Trace Client C/C++ API that provides encapsulation of the protocol used to send trace messages to the Ayxia Trace GUI.

The C++ API provides the best performance since it can take advantage of variadic templates to gather type information which can be used to perform text formatting in the viewer application instead of in the code being traced. This can result in significant speedups.

Log Viewer

The Ayxia Trace log viewer application is available here:

https://www.ayxia.com

Code Example

C++

The C++ API uses {argn} type formatting often seen in languages like C# and Java. By default, the API can format char pointers, numbers, std::string and std::wstring. Unicode characters should be fine and std::string is considered UTF-8 encoded.

#include <trace/trace.h>

int main() 
{
  TRACE_ERROR("some.channel",
    "this is a test {0} {1} {2,16:4} {3:4} 0x{0:x}",
    123, "test", float(123), double(123));
}

C

Using C isn't quite as easy because it uses printf format to format the string, so all of the caveats that come with printf also apply, for example using %s with an integer value will likely cause a fault, or trying to format a floating point value with %d will give you incorrect results.

TRACE_INFO("some.channel", "this is a test %d", i);

License

The software in this repository (not including submodules) is licensed under Apache License 2.0, included here by reference.

Apache License 2.0

trace-client's People

Contributors

jmatzen avatar

Stargazers

Andrey avatar Jakob Törmä avatar Matteo Bertello avatar Trent Nelson avatar Lucas Abel avatar Chris avatar Chen Tao avatar  avatar Zabir Hoque avatar

Watchers

 avatar  avatar

Forkers

okam alecgrover

trace-client's Issues

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.