Coder Social home page Coder Social logo

Improved custom logging about websocketpp HOT 2 OPEN

Sil3ntStorm avatar Sil3ntStorm commented on June 22, 2024
Improved custom logging

from websocketpp.

Comments (2)

loupus avatar loupus commented on June 22, 2024

please check iostream server example
https://github.com/zaphoyd/websocketpp/blob/master/examples/iostream_server/iostream_server.cpp
you can set your own output stream but consider that "C++ iostream's don't support the idea of asynchronous"

from websocketpp.

Sil3ntStorm avatar Sil3ntStorm commented on June 22, 2024

I have not looked into those functions (and probably won't have the time to for at least a few weeks), but it sounds like those might be specific to iostreams.

My intention was more along the lines of having the option to log using whatever method I desire and not having to hardcode in any kind of specifics, especially with regards to developing libraries for third party consumption that use this.

However the log backend is hardcoded in the config struct and there is no access (that I had seen) to those from clients which would allow to replace / change their functionality from the outside.
It might however be possible to implement some kind of callback system with get_alog() / get_elog() and just having some sort of skeleton logger that does not actually do anything but offer the ability to set callbacks and call them when websocketpp would like to log things. Will have to look into that when I find some time.

from websocketpp.

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.