Skip to content
Snippets Groups Projects
Commit 5a825d5f authored by g0dil's avatar g0dil
Browse files

Utils/Logger: Documentation

Utils/Console: Add chroot() member ConfigBundle
parent 3455ca51
No related branches found
No related tags found
No related merge requests found
...@@ -53,6 +53,11 @@ prefix_ senf::console::DirectoryNode & senf::console::detail::RestrictedExecutor ...@@ -53,6 +53,11 @@ prefix_ senf::console::DirectoryNode & senf::console::detail::RestrictedExecutor
return executor_.chroot(); return executor_.chroot();
} }
prefix_ void senf::console::detail::RestrictedExecutor::chroot(DirectoryNode & node)
{
executor_.chroot(node);
}
prefix_ std::ostream & senf::console::detail::RestrictedExecutor::stream() prefix_ std::ostream & senf::console::detail::RestrictedExecutor::stream()
{ {
return stream_; return stream_;
...@@ -85,6 +90,17 @@ prefix_ void senf::console::ConfigBundle::reset() ...@@ -85,6 +90,17 @@ prefix_ void senf::console::ConfigBundle::reset()
executor_.reset(); executor_.reset();
} }
prefix_ senf::console::DirectoryNode & senf::console::ConfigBundle::root()
const
{
return executor_.root();
}
prefix_ void senf::console::ConfigBundle::chroot(DirectoryNode & node)
{
executor_.chroot(node);
}
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// senf::console::detail::ConfigSource // senf::console::detail::ConfigSource
......
...@@ -90,6 +90,9 @@ namespace console { ...@@ -90,6 +90,9 @@ namespace console {
parsed nodes is cleared. Calling parse() will parse the parsed nodes is cleared. Calling parse() will parse the
complete config bundle again. */ complete config bundle again. */
DirectoryNode & root() const;
void chroot(DirectoryNode & node);
protected: protected:
private: private:
......
...@@ -77,6 +77,7 @@ namespace detail { ...@@ -77,6 +77,7 @@ namespace detail {
complete config file again. */ complete config file again. */
DirectoryNode & root() const; DirectoryNode & root() const;
void chroot(DirectoryNode & node);
std::ostream & stream(); std::ostream & stream();
......
...@@ -84,7 +84,7 @@ namespace log { ...@@ -84,7 +84,7 @@ namespace log {
Each parameter (stream, area and level) has two representations: A static (compile time Each parameter (stream, area and level) has two representations: A static (compile time
constant) representation, which is the representation also used in the %log statements, and a constant) representation, which is the representation also used in the %log statements, and a
dynamic representation, which may be used for manipulating the routing table. dynamic (runtime) representation.
The static representation is used, when passing routing parameters via template arguments: The static representation is used, when passing routing parameters via template arguments:
\code \code
...@@ -114,6 +114,21 @@ namespace log { ...@@ -114,6 +114,21 @@ namespace log {
loglevels. Dynamically, it is represented by an unsigned integer number, the \c value loglevels. Dynamically, it is represented by an unsigned integer number, the \c value
member of that class. member of that class.
\subsection target_routing_processing Ordering routing entries and route processing
The routing table is processed from first route to last route, the first matching entry
determines the fate of a log messages. Therefore, the ordering of routing entries is
important.
If no position is explicitly specified, new routing entries are added to the end of the
routing table. All routing statements however take an index as optional argument to
explicitly specify the position of the new routing entry.
The index value starts from 0 for the first route. The value gives the position the new
routing entry will have after it has been added. An index of 0 will thus insert the new
routing entry at the beginning of the table. Negative values count from the back, -1 being
the last entry.
\section target_impl Implementing new targets \section target_impl Implementing new targets
To implement a new target type, you need to derive from senf::log::Target and implement the To implement a new target type, you need to derive from senf::log::Target and implement the
......
...@@ -6,6 +6,7 @@ ActiveFeederSink ...@@ -6,6 +6,7 @@ ActiveFeederSink
ActiveFeederSource ActiveFeederSource
ActiveInput ActiveInput
ActiveOutput ActiveOutput
ActiveOutputJack
ActiveSink ActiveSink
ActiveSocketReader ActiveSocketReader
ActiveSource ActiveSource
...@@ -15,12 +16,14 @@ AddressingPolicyBase ...@@ -15,12 +16,14 @@ AddressingPolicyBase
AddressParser AddressParser
addrs addrs
addtogroup addtogroup
aka
aListCollection aListCollection
alloc alloc
AnnotationRouter AnnotationRouter
AnnotationType AnnotationType
anotherCallback anotherCallback
api api
ApplyInterfaceDecorator
arg arg
argattributes argattributes
argc argc
...@@ -60,6 +63,7 @@ cci ...@@ -60,6 +63,7 @@ cci
cd cd
cerr cerr
cfi cfi
ChannelGroupTable
checksumEnabled checksumEnabled
checksumPresent checksumPresent
CIDR CIDR
...@@ -126,6 +130,10 @@ DTCP ...@@ -126,6 +130,10 @@ DTCP
DTCPHelloPacket DTCPHelloPacket
DVB DVB
ElementParser ElementParser
EmulatedInterface
EmulatedReceiver
EmulatedTransmitter
EmulatedWLANInterface
enableChecksum enableChecksum
endcode endcode
endhtmlonly endhtmlonly
...@@ -231,6 +239,7 @@ IDE ...@@ -231,6 +239,7 @@ IDE
IdleEvent IdleEvent
ietf ietf
iface iface
ifconfig
ifndef ifndef
ih ih
impl impl
...@@ -246,6 +255,7 @@ InputConnector ...@@ -246,6 +255,7 @@ InputConnector
inputSocket inputSocket
Institut Institut
int int
InterfaceAPI
IntervalTimer IntervalTimer
IntField IntField
InvalidPacketChainException InvalidPacketChainException
...@@ -317,11 +327,14 @@ multicast ...@@ -317,11 +327,14 @@ multicast
MulticastSocketProtocol MulticastSocketProtocol
MyClass MyClass
mycommand mycommand
MyDecoration
mydir mydir
myDirectory myDirectory
MyEnum MyEnum
MyInputGroup
MyList MyList
MyNodeType MyNodeType
MyOutputGroup
MyParser MyParser
myserver myserver
MySpecialObject MySpecialObject
...@@ -329,10 +342,12 @@ mytarget ...@@ -329,10 +342,12 @@ mytarget
MyVariant MyVariant
MyVariantPolicy MyVariantPolicy
MyVector MyVector
MyWLANInterface
namespace namespace
nbar nbar
nc nc
netcat netcat
NetEmu
NETwork NETwork
newpacket newpacket
NewPacket NewPacket
...@@ -345,11 +360,13 @@ NoAddressingPolicy ...@@ -345,11 +360,13 @@ NoAddressingPolicy
NoBuiltin NoBuiltin
NodeCreateTraits NodeCreateTraits
noinit noinit
noop
noroute noroute
nothrow nothrow
nrOfRecords nrOfRecords
nrOfSources nrOfSources
nUsing nUsing
NyInputGroup
ob ob
ObjectDirectory ObjectDirectory
offene offene
...@@ -412,6 +429,7 @@ ParseVariant ...@@ -412,6 +429,7 @@ ParseVariant
ParseVec ParseVec
PassiveConnector PassiveConnector
PassiveInput PassiveInput
PassiveInputJack
PassiveJoin PassiveJoin
PassiveOutput PassiveOutput
PassiveQueue PassiveQueue
...@@ -460,6 +478,7 @@ RP ...@@ -460,6 +478,7 @@ RP
SafePacketParser SafePacketParser
SatCom SatCom
Satelitenkommunikation Satelitenkommunikation
sbund
SConfig SConfig
scons scons
SCons SCons
...@@ -575,6 +594,7 @@ TruncatedPacketException ...@@ -575,6 +594,7 @@ TruncatedPacketException
tt tt
ttl ttl
TunTapSocketHandle TunTapSocketHandle
txpower
TypeA TypeA
TypeB TypeB
typeField typeField
...@@ -611,6 +631,13 @@ Ver ...@@ -611,6 +631,13 @@ Ver
vlanId vlanId
VLanId VLanId
VoidPacketParser VoidPacketParser
WiredInterface
WiredReceiver
WiredTransmitter
WirelessInterface
WirelessReceiver
WirelessTransmitter
WLAN
Wno Wno
Woverloaded Woverloaded
WrapException WrapException
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment