Add option for inclusive c14n.
[shibboleth/cpp-sp.git] / shib-target / testlog.cpp
1 /*
2  *  Copyright 2001-2005 Internet2
3  * 
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #include <log4cpp/Category.hh>
18 #include <log4cpp/RemoteSyslogAppender.hh>
19 #include <log4cpp/SyslogAppender.hh>
20
21 #include <string>
22
23 using namespace std;
24 using namespace log4cpp;
25
26 main()
27 {
28   Category& log = Category::getRoot();
29
30   string name = "name";
31   string sysname = "sysname";
32   string relayer = "localhost";
33   RemoteSyslogAppender app(name, sysname, relayer, -1, -1);
34   log.setAppender(app);
35
36   log.error("Test Log Entry");
37
38   Category& syslog = Category::getInstance("test");
39   SyslogAppender sapp(name, sysname);
40   syslog.setAppender(sapp);
41
42   syslog.error("test Syslog entry");
43 }