Comments (5)
Fair point. Do you have an alternative in mind? I can think of three:
1. Use printf instead. It's supposed to be much lighter weight.
2. Require a flag during build to create a "debug" version that include this
error logging
3. Both 1 and 2 above.
Thoughts?
Original comment by [email protected]
on 16 Jul 2014 at 10:17
from cld2.
I've thought a bit more about this and I think what we should do here is add a
logging helper to CLD2, and use that. We can then twiddle the logger on/off
based on a DEFINE, just like many other logging frameworks. I don't want to add
a third-party logging solution because the overhead just isn't worth it for our
very sparse usage, at least not at present.
We can switch to printf for now, and go down the define flag avenue later if it
seems worthwhile. Sound good?
Original comment by [email protected]
on 25 Jul 2014 at 8:10
from cld2.
Checked in compact_lang_det_impl.cc and found the standard pattern used here,
which is fprintf([stderr|stdout], ...). So that's the way to go.
Original comment by [email protected]
on 25 Jul 2014 at 8:42
from cld2.
Original comment by [email protected]
on 25 Jul 2014 at 8:42
- Changed state: Accepted
from cld2.
Committed as r164.
Original comment by [email protected]
on 25 Jul 2014 at 11:48
- Changed state: Fixed
from cld2.
Related Issues (20)
- Consider declaring dynamic data methods unconditionally HOT 3
- CLD2 result chunk vector omits portions of input file HOT 6
- Windows build fails: undeclared identifier 'close' HOT 6
- Support mmap-ing dynamic data on win32 HOT 5
- Build warning on Windows with clang HOT 2
- Eliminate redundancy and/or simplify default case for compiling unittest_data.h HOT 4
- Missing include in cld2_dynamic_data_loader.cc HOT 1
- cld2_dynamic_data.cc and cld2_dynamic_data_loader.cc problems on Win32 HOT 10
- Enable dynamic data for 20141015 release HOT 1
- New GCC 5.0 hits problem with narrowing in list-initializers
- CLD should check result of "new" in all use cases HOT 1
- please use CFLAGS CXXFLAGS CPPFLAGS and LDFLAGS HOT 3
- please provide a SONAME HOT 13
- cld2 testsuite failures HOT 3
- Compilation issues in Visual Studio
- Compilation failure on VS2015 on Windows
- Check in tools for generating generated_* files HOT 1
- Add armv8-a support HOT 5
- new code location? HOT 4
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 cld2.