Miniglog and suppressing logs

682 views
Skip to first unread message

Alessandro Dal Grande

unread,
Dec 3, 2014, 2:11:15 AM12/3/14
to ceres-...@googlegroups.com
The only way I found to really suppress logs is putting this at the top of internal/ceres/miniglog/logging.h:

#define MAX_LOG_LEVEL -1

This works, but I have to change Ceres' sources and after compilation I am of course not able to change the value, in case I want to say, activate debugging for dev but not for production. Is there any other way, or is a patch needed?

Thanks

Sameer Agarwal

unread,
Dec 3, 2014, 11:29:56 AM12/3/14
to ceres-...@googlegroups.com

You can do the sane define on the compiler command line. That way no code needs editing.


--
You received this message because you are subscribed to the Google Groups "Ceres Solver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ceres-solver...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/e9214d2a-8d64-4271-8220-ef548a2c9b8c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alessandro Dal Grande

unread,
Dec 3, 2014, 11:59:20 AM12/3/14
to ceres-...@googlegroups.com
Hey Sameer,

if I compile the library separately from my project it will be fixed at library compilation time though right?

Thanks

Sameer Agarwal

unread,
Dec 3, 2014, 7:32:49 PM12/3/14
to ceres-...@googlegroups.com

No because things like autodiff which use blog and templates are compiled when you build your application.


Alessandro Dal Grande

unread,
Dec 4, 2014, 1:20:22 AM12/4/14
to ceres-...@googlegroups.com
Thanks I'll remember that.
Reply all
Reply to author
Forward
0 new messages