Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
senf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wiback
senf
Commits
d890efe9
Commit
d890efe9
authored
16 years ago
by
g0dil
Browse files
Options
Downloads
Patches
Plain Diff
Utils/Logger: Target examples\nPackets: Relax annotation type restrictions
parent
6f98e372
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Packets/PacketImpl.hh
+5
-2
5 additions, 2 deletions
Packets/PacketImpl.hh
Utils/Logger/FileTarget.hh
+7
-0
7 additions, 0 deletions
Utils/Logger/FileTarget.hh
Utils/Logger/SyslogTarget.hh
+7
-0
7 additions, 0 deletions
Utils/Logger/SyslogTarget.hh
with
19 additions
and
2 deletions
Packets/PacketImpl.hh
+
5
−
2
View file @
d890efe9
...
@@ -31,7 +31,8 @@
...
@@ -31,7 +31,8 @@
#include
<vector>
#include
<vector>
#include
<boost/utility.hpp>
#include
<boost/utility.hpp>
#include
<boost/type_traits/is_base_of.hpp>
#include
<boost/type_traits/is_base_of.hpp>
#include
<boost/type_traits/is_pod.hpp>
#include
<boost/type_traits/has_trivial_constructor.hpp>
#include
<boost/type_traits/has_trivial_destructor.hpp>
#include
<boost/static_assert.hpp>
#include
<boost/static_assert.hpp>
#include
"../Utils/pool_alloc_mixin.hh"
#include
"../Utils/pool_alloc_mixin.hh"
#include
"PacketTypes.hh"
#include
"PacketTypes.hh"
...
@@ -98,7 +99,9 @@ namespace detail {
...
@@ -98,7 +99,9 @@ namespace detail {
# ifdef BOOST_HAS_TYPE_TRAITS_INTRINSICS
# ifdef BOOST_HAS_TYPE_TRAITS_INTRINSICS
BOOST_STATIC_ASSERT
((
boost
::
is_pod
<
Annotation
>::
value
||
Complex
));
BOOST_STATIC_ASSERT
((
(
boost
::
has_trivial_constructor
<
Annotation
>::
value
&&
boost
::
has_trivial_destructor
<
Annotation
>::
value
)
||
Complex
));
# endif
# endif
};
};
...
...
This diff is collapsed.
Click to expand it.
Utils/Logger/FileTarget.hh
+
7
−
0
View file @
d890efe9
...
@@ -42,6 +42,13 @@ namespace log {
...
@@ -42,6 +42,13 @@ namespace log {
The FileTarget will save all %log messages in the given file. Messages will be appended at
The FileTarget will save all %log messages in the given file. Messages will be appended at
the end of the file.
the end of the file.
\code
senf::log::FileTarget target ("file.name");
// Route all messages to this file.
target.route();
\endcode
After %log files have been rotated, the reopen() member should be called to create a new %log
After %log files have been rotated, the reopen() member should be called to create a new %log
file.
file.
...
...
This diff is collapsed.
Click to expand it.
Utils/Logger/SyslogTarget.hh
+
7
−
0
View file @
d890efe9
...
@@ -40,6 +40,13 @@ namespace log {
...
@@ -40,6 +40,13 @@ namespace log {
The SyslogTarget will send all log messages to the syslog at the given facility.
The SyslogTarget will send all log messages to the syslog at the given facility.
\code
senf::log::SyslogTarget syslog;
// Route all messages to the syslog
syslog.route();
\endcode
Valid facility values (taken from <tt>man 3 syslog</tt>):
Valid facility values (taken from <tt>man 3 syslog</tt>):
\par ""
\par ""
<tt>LOG_AUTHPRIV</tt>, <tt>LOG_CRON</tt>, <tt>LOG_DAEMON</tt>, <tt>LOG_FTP</tt>,
<tt>LOG_AUTHPRIV</tt>, <tt>LOG_CRON</tt>, <tt>LOG_DAEMON</tt>, <tt>LOG_FTP</tt>,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment