Comments (1)
Hi DongZhaoYu,
Thanks for your interest in NanoLog. I think NanoLog can be ported to a language like C#, but it will require a non-trivial amount of work. I'll provide a brief overview of how one might port preprocessor NanoLog to C# below, but one should refer to the 2018 ATC NanoLog Paper for more information.
To port preprocessor NanoLog, I would...
- Modify the preprocessor's parser to recognize C#. I think C++ and C# are close enough that not many changes will have to be made here.
- Change the preprocessor's code generator to generate C# code for the record(), compress(), and writeDictionary() functions.
- Implement a C# equivalent of the runtime. This would involve:
- Building in-memory byte buffers to store the log data. This would ideally resemble like the StagingBuffers in RuntimeLogger.h, but it can be as simple as a byte buffer with a reader/writer lock on it.
- A background thread to collect the log data and write it to disk in a format compatible for NanoLog's post-processor. Hints on how to do this are present in the Log.h header, but at a high level I would ``insertCheckpoint(); writeDictionary(); Encoder::encodeLogMsgs();''
Let me know if you have any additional questions.
Best Regards,
Stephen
from nanolog.
Related Issues (20)
- Any suggestion to improve NanoLog type safety? HOT 5
- Add a switch to enable log output to stdout.
- Add a macro switch for a more convenient uncompressed output.
- Try std::string_view instead
- Performance
- No conan or vcpkg integration
- Online decompressor HOT 1
- ability to file swap
- Having a background text file writer instead of the compressor with binary log writer
- Infinite Loop in Makefile Dependency Generation
- Write to multiple log files.
- Capability of file rolling
- Run into "Internal Error: Corrupted BufferExtend"
- Can I build a python wrap for nanolog?
- system level use of nanlog?
- windows support
- Memory leak in NanoLog?
- arm64 Support
- No updates since 3 years ago HOT 1
- is there a Rust equivalent of this package?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nanolog.