# rlog::FileNode Class Reference

Provides filename based logging nodes. More...

`#include <rlog/rloglocation.h>`

Inheritance diagram for rlog::FileNode:

List of all members.

## Public Member Functions

| FileNode (const char *componentName, const char *fileName)
| FileNode (const char *fileName)
| RLOG_NO_COPY (FileNode)

## Static Public Member Functions

static FileNode * | Lookup (const char *componentName, const char *fileName)
static FileNode * | Lookup (const char *fileName)

## Public Attributes

std::string | componentName
std::string | fileName

## Detailed Description

Provides filename based logging nodes.

This allows subscribing to messages only from particular files. For example,

      int main()
      {
          // display some messages to stderr
          StdioNode std( STDERR_FILENO );

          // subscribe to everything from this file
          std.subscribeTo( FileNode::Lookup( __FILE__ ) );

          // and everything from "important.cpp"
          std.subscribeTo( FileNode::Lookup( "important.cpp" ));
      }

Note that file names are not required to be unique across the entire program. Different components may contain the same filename, which is why there is a second Lookup function which also takes the component name.

See also:
  RLogChannel

Author:
  Valient Gough

The documentation for this class was generated from the following files:

- rloglocation.h
- rloglocation.cpp