Skip to content

Tokenized logging for C projects to reduce binary sizes

License

Notifications You must be signed in to change notification settings

jlubawy/go-ctlog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jlubawy/go-ctlog

Build Status

This project is a C library and a collection of build tools that can be used to add tokenized logging to a C project.

This is a work in progress, no guarantees are made as far as API goes. If there is interest in this project let me know and I can work towards making more guarantees.

The idea behind tokenized logging is to reduce program binary sizes by replacing strings used for debugging and logging with "tokens". A token is defined as a module index and line number that can be used to lookup the replaced strings at runtime to reproduce the original output. In real-life programs the savings are typically multiple kB which can make or break a project if memory is at a premium.

See examples/arduino for a more concrete example running on an embedded device.

See examples/basic for something that can be run on a PC.

About

Tokenized logging for C projects to reduce binary sizes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published