Comments (4)
- I'm not sure what you mean by "using it with lambda style formatter".
format_date_time
can be used in the Boost.Phoenix lambda expression, an example is given here. The formatter is not designed to be called directly from a C++11 lambda, if that is what you want, because it has to cache the parsed format string. But you can work it around by injecting your C++ lambda into the Boost.Phoenix expression.
I cannot document every formatting or filtering tool in the tutorial because it has to be short and just get you started. It is not meant to give you the full overview of the library. All components are documented in a separate section.
-
There is a link to the complete code by every example in the tutorial. Includes are omitted from the examples in the tutorial for brevity. There are links to the related headers in the beginning of every section in the detailed description of every component.
-
This is done by filtering, which is covered in the tutorial. There is a good summary of how to do this in this SO answer.
I know the tutorial is probably not delivering in the full library overview department, but the library is too big to put everything in the tutorial. There are many use cases, I can't describe every one of them. Instead, I tried to document every component separately and the library design so that users are able to choose the components they need and combine them.
That said, patches to improve the docs are always welcome.
from log.
There is a link to the complete code by every example in the tutorial. Includes are omitted from the examples in the tutorial for brevity.
I've been working with Boost log for about 2 years now, and I think this is something that should be avoided in the documentation. I frequently find myself very confused about the intended way to do things, or even if some things are possible. But even more narrowly, having to hunt down where the heck a magic keyword / function / identifier is coming from in the header files is a major pain.
Brevity is not a desirable trait in technical documentation in general, as it tends to leave the reader left without any information of what the relationship between the parts left out of the explanation are, and frequently there are very few relevant results for Boost::Log on google or stack overflow for even question that seem simple.
from log.
If you found the documentation of the particular component in Boost.Log docs, you can see the relevant includes at the very beginning of the section.
Regarding tutorial specifically, I would have liked to have some sort of expandable source code that is hidden by default to allow users to see the includes in-place, but unfortunately this is not possible with QuickBook. Links to full examples will have to do.
PS: You can see in the full source code that the amount of includes sometimes come close to the actual code snippets in terms of line count. I don't want to double the amount of code users have to parse through to get the basic understanding of the library, which is what the tutorial is for.
from log.
Well, it's your project, so if you think that's a major concern, then go for it.
But I strongly disagree with you. It's really annoying to see examples, from any project, that I can't just copy-paste into a file and compile. When reading the documentation from Boost.Log, i spend more time trying to figure out where in the project source code the items being documented are coming from than I do reading the documentation itself. At that point, why bother with the documentation? Incomplete documentation can sometimes be worse than no documentation, because people all over the internet (e.g. stackoverflow) respond to questions about the topic with hyperlinks to the incomplete documentation that didn't answer the question in the first place, thus necessitating the post on stackoverflow. It's a self-reinforcing problem.
Anyway, that's my thoughts on the issue. I won't bring it up again unless I'm asked to.
from log.
Related Issues (20)
- Undesired time based rotation HOT 3
- Separating loggers and sinks HOT 8
- compilation error in set_formatter method HOT 2
- Combining expressions with parse_filter
- Logger is unbuffered HOT 3
- Detected memory leaks when use boost.log in sharted library. HOT 3
- log lib failed to build due to ERROR: AddressSanitizer: allocator is out of memory trying to allocate on MSVC in asan mode HOT 1
- logging may substantially exceed total_size HOT 9
- Build for Android fails with "error: unable to find library -lrt" HOT 2
- clang-15 warning: definition of implicit copy assignment operator for 'value_ref<jb::severity_level>' is deprecated because it has a user-declared copy constructor
- Performance issue: Boost.Log does a huge work when filtering records HOT 4
- Redirect log records to specific sink only HOT 4
- Max file rotating under the same target directory HOT 1
- BOOST_LOG_TRIVIAL cannot find overloaded `operator<<()` when it's declared in global scope HOT 2
- using BOOST_LOG_TRIVIAL << with string greater than max_size_decor results in bufferoverlfow detected HOT 3
- An infinite loop occurs when boost writes to the log file HOT 4
- Timezone information with text file backend HOT 2
- Boost.Log rotation may throw boost::filesystem::filesystem_error HOT 10
- How to add timezone info for log entries and log filename HOT 3
- Formatting TimeStamp HOT 1
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 log.