moved C code to a unified logging framework which currently supports syslogging and...
[OpenSRF.git] / examples / opensrf_core.xml.example
1 <?xml version='1.0'?>
2
3 <!-- Bootstrap config file for the C opensrf_stack library -->
4 <config>
5
6
7         <opensrf> <!-- bootstrap config for the C apps -->
8       <router_name>router</router_name>
9       <routers>
10          <router>127.0.0.1</router>
11       </routers>
12       <domains>
13          <domain>127.0.0.1</domain>
14       </domains>
15       <username>client</username>
16       <passwd>mypass</passwd>
17       <port>5222</port>
18       <logfile>/openils/var/log/osrfsys.log</logfile>
19       <loglevel>3</loglevel>
20    </opensrf>
21
22
23         <chopchop> <!-- Our jabber server -->
24                 <domain>127.0.0.1</domain>
25                 <secret>secret</secret>
26                 <port>5222</port>
27                 <s2sport>5269</s2sport>
28                 <listen_address>10.0.0.3</listen_address>
29                 <loglevel>3</loglevel>
30                 <logfile>syslog</logfile>
31                 <syslog>local2</syslog>
32         </chopchop>
33
34
35         <!-- The section between <gateway>...</gateway> is a standard OpenSRF C stack config file -->
36         <gateway>
37
38                 <!--  the routers's name on the network -->
39                 <router_name>router</router_name>
40
41                 <!-- jabber domains to connect to (domain1, domain2, ...) -->
42                 <domains>
43                         <domain>127.0.0.1</domain>
44                 </domains>
45
46                 <!-- jabber login info -->
47                 <username>mylogin</username>
48                 <passwd>mypassword</passwd>
49
50                 <!-- If the port is a positive number,
51                         we will connect via TCP port, if not and unixpath is defined,
52                         we will connect via UNIX domain socket with the given path -->
53                 <port>5222</port>
54                 <unixpath>/openils/var/sock/jserver.sock</unixpath>
55         
56                 <!-- log file location -->
57                 <logfile>/openils/var/log/gateway.log</logfile>
58                 <!-- 0 None, 1 Error, 2 Warning, 3 Info, 4 debug -->
59                 <loglevel>3</loglevel>
60
61         </gateway>
62
63         <rest_gateway>
64                 <router_name>router</router_name>
65                 <domains>
66                         <domain>127.0.0.1</domain>
67                 </domains>
68                 <username>mylogin</username>
69                 <passwd>mypassword</passwd>
70                 <port>5222</port>
71                 <unixpath>/openils/var/sock/jserver.sock</unixpath>
72                 <logfile>/openils/var/log/gateway.log</logfile>
73                 <loglevel>3</loglevel>
74         </rest_gateway>
75
76         <!-- ======================================================================================== -->
77
78         <router>
79                 <component>0</component> <!-- leave disabled for now -->
80         
81                 <trusted_domains>
82                         <!-- Trusted servers are allowed to register apps with the router -->
83                         <server>127.0.0.1</server>
84                         <!-- Trusted clients are allowed to send packets through the router -->
85                         <client>127.0.0.1</client>
86                 </trusted_domains>
87         
88                 <transport>
89                         <!-- jabber server are we connecting to -->
90                         <server>127.0.0.1</server>
91                         <!-- If the port is a positive number,
92                                 we will connect via TCP port, if not and unixpath is defined,
93                                 we will connect via UNIX domain socket with the given path -->
94                         <port>5222</port>
95                         <unixpath>/openils/var/sock/unix_sock</unixpath>
96
97                         <!-- router's name on the network -->
98                         <username>router</username>
99                         <password>mypassword</password>
100                         <!-- router's jabber resource --> 
101                         <resource>router</resource>
102                         <connect_timeout>10</connect_timeout>
103                         <max_reconnect_attempts>5</max_reconnect_attempts>
104                 </transport>
105         
106                 <logfile>/openils/var/log/router.log</logfile>
107                 <loglevel>3</loglevel>
108         
109         </router>
110
111         <!-- ======================================================================================== -->
112
113 </config>
114
115
116
117