Git Product home page Git Product logo

rtlog-cpp's People

Contributors

chrhaase avatar cjappl avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

rtlog-cpp's Issues

Allow configuration to use a MPSC queue instead of only a SPSC

Currently, it's required that there is only one thread doing RT Logging (enqueuing ), and another doing the actual loging (dequeing)

ReaderWriterQueue is SPSC, we could possible use ConcurrentQueue by the same author to support multiple realtime threads.

Make sequence number optional

It's possible that not everyone wants to use the sequence number feature.

Is there a reasonable way to make it optional?

Linker errors

Hi, first of all, thanks for this! I've been looking for a proper realtime logging lib for a while without luck, but this looks very promising! :)

I'm having some trouble setting the build up correctly.
Basically the problem is this: I have a header (Logging.h) where all the logging macros, types and severity enums are defined. This includes rtlog.h. However, when Logging.h is then included where ever I need to log things I get duplicate symbols when linking:

[1/1] Linking CXX executable audioapp
FAILED: audioapp 
: && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -g -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk -mmacosx-version-min=11.6 -Wl,-search_paths_first -Wl,-headerpad_max_install_names  CMakeFiles/audioapp.dir/Logging.cpp.o CMakeFiles/audioapp.dir/main.cpp.o -o audioapp   && :
duplicate symbol '_stbsp_set_separators' in:
    CMakeFiles/audioapp.dir/Logging.cpp.o
    CMakeFiles/audioapp.dir/main.cpp.o
duplicate symbol '_stbsp_vsprintf' in:
    CMakeFiles/audioapp.dir/Logging.cpp.o
    CMakeFiles/audioapp.dir/main.cpp.o
duplicate symbol '_stbsp_sprintf' in:
    CMakeFiles/audioapp.dir/Logging.cpp.o
    CMakeFiles/audioapp.dir/main.cpp.o
duplicate symbol '_stbsp_vsnprintf' in:
    CMakeFiles/audioapp.dir/Logging.cpp.o
    CMakeFiles/audioapp.dir/main.cpp.o
duplicate symbol '_stbsp_snprintf' in:
    CMakeFiles/audioapp.dir/Logging.cpp.o
    CMakeFiles/audioapp.dir/main.cpp.o
duplicate symbol '_stbsp_vsprintfcb' in:
    CMakeFiles/audioapp.dir/Logging.cpp.o
    CMakeFiles/audioapp.dir/main.cpp.o
duplicate symbol 'evr::gRealtimeLogger' in:
    CMakeFiles/audioapp.dir/Logging.cpp.o
    CMakeFiles/audioapp.dir/main.cpp.o
duplicate symbol 'evr::gSequenceNumber' in:
    CMakeFiles/audioapp.dir/Logging.cpp.o
    CMakeFiles/audioapp.dir/main.cpp.o
ld: 8 duplicate symbols for architecture x86_64

I've made a dead simple example project here, so you can reproduce what I'm doing.
It seems the issue comes down to stb_sprintf.h being built with STB_SPRINTF_IMPLEMENTATION multiple times (one for each cpp including my logging header.

Am I setting this up in a weird way?

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.