File: testProperties.cpp

package info (click to toggle)
log4cpp 1.1.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,444 kB
  • sloc: cpp: 6,715; sh: 3,670; ansic: 1,049; makefile: 295
file content (14 lines) | stat: -rw-r--r-- 320 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include "Properties.hh"
#include <iostream>
#include <fstream>

int main(int argc, char** argv) {
    log4cpp::Properties properties;
    std::string inFile = (argc > 1) ? argv[1] : "log4cpp.properties";  
    std::ifstream in(inFile.c_str());

    properties.load(in);
    properties.save(std::cout);
    return 0;
}