gbase
Loading...
Searching...
No Matches
test_gbase.cc File Reference

Example program demonstrating how to derive from GBase and use logging. More...

#include "gbase.h"
Include dependency graph for test_gbase.cc:

Go to the source code of this file.

Data Structures

class  g1
 
class  g2
 

Functions

GOptions defineOptions ()
 
int main (int argc, char *argv[])
 

Variables

constexpr const char * G1_LOGGER = "hello1"
 
constexpr const char * G2_LOGGER = "hello2"
 

Detailed Description

This example shows two common usage patterns: 1) A derived type that constructs its own logger via GOptions. 2) A derived type that reuses an already constructed shared GLogger .

The focus is on illustrating:

  • How derived classes access the protected log member from GBase .
  • How different logger naming/channel choices can be routed through options.
  • How typical message categories (info, warning, debug) might be used.

Notes:

  • This file is intentionally an example/driver and does not provide authoritative API documentation for GBase itself (see the header for API docs).
  • The classes in this file are minimal and exist only to demonstrate construction patterns and log calls.

Definition in file test_gbase.cc.

Function Documentation

◆ defineOptions()

GOptions defineOptions ( )

Definition at line 66 of file test_gbase.cc.

◆ main()

int main ( int argc,
char * argv[] )

Definition at line 76 of file test_gbase.cc.

Variable Documentation

◆ G1_LOGGER

constexpr const char* G1_LOGGER = "hello1"
constexpr

Definition at line 23 of file test_gbase.cc.

◆ G2_LOGGER

constexpr const char* G2_LOGGER = "hello2"
constexpr

Definition at line 24 of file test_gbase.cc.