aboutsummaryrefslogtreecommitdiffstats
path: root/log.h
blob: f574ae07b4dd643d36a7be1773609e4e24ab787f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
  /********************************************************************\
  * BitlBee -- An IRC to other IM-networks gateway                     *
  *                                                                    *
  * Copyright 2002-2005 Wilmer van der Gaast and others                *
  \********************************************************************/

/* Logging services for the bee                               */

/*
  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License with
  the Debian GNU/Linux distribution in /usr/share/common-licenses/GPL;
  if not, write to the Free Software Foundation, Inc., 59 Temple Place,
  Suite 330, Boston, MA  02111-1307  USA
*/

#ifndef _LOG_H
#define _LOG_H

typedef enum {
	LOGLVL_INFO,
	LOGLVL_WARNING,
	LOGLVL_ERROR,
#ifdef DEBUG
	LOGLVL_DEBUG,
#endif
} loglvl_t;

typedef enum {
	LOGOUTPUT_NULL,
	LOGOUTPUT_IRC,
	LOGOUTPUT_SYSLOG,
	LOGOUTPUT_CONSOLE,
} logoutput_t;

typedef struct log_t {
	void (*error)(int level, char *logmessage);
	void (*warning)(int level, char *logmessage); 
	void (*informational)(int level, char *logmessage);
#ifdef DEBUG
	void (*debug)(int level, char *logmessage);
#endif
} log_t;

void log_init(void);
void log_link(int level, int output);
void log_message(int level, char *message, ...) G_GNUC_PRINTF( 2, 3 );
void log_error(char *functionname);

#endif
ld } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.03">
	<data>
		<int key="IBDocument.SystemTarget">528</int>
		<string key="IBDocument.SystemVersion">9L31a</string>
		<string key="IBDocument.InterfaceBuilderVersion">677</string>
		<string key="IBDocument.AppKitVersion">949.54</string>
		<string key="IBDocument.HIToolboxVersion">353.00</string>
		<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
			<bool key="EncodedWithXMLCoder">YES</bool>
			<integer value="1"/>
		</object>
		<object class="NSArray" key="IBDocument.PluginDependencies">
			<bool key="EncodedWithXMLCoder">YES</bool>
			<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
		</object>
		<object class="NSMutableDictionary" key="IBDocument.Metadata">
			<bool key="EncodedWithXMLCoder">YES</bool>
			<object class="NSArray" key="dict.sortedKeys">
				<bool key="EncodedWithXMLCoder">YES</bool>
			</object>
			<object class="NSMutableArray" key="dict.values">
				<bool key="EncodedWithXMLCoder">YES</bool>
			</object>
		</object>
		<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
			<bool key="EncodedWithXMLCoder">YES</bool>
			<object class="IBProxyObject" id="372490531">
				<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
			</object>
			<object class="IBProxyObject" id="711762367">
				<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
			</object>
			<object class="IBUIView" id="191373211">
				<reference key="NSNextResponder"/>
				<int key="NSvFlags">292</int>
				<object class="NSMutableArray" key="NSSubviews">
					<bool key="EncodedWithXMLCoder">YES</bool>
					<object class="IBUITableView" id="810055614">
						<reference key="NSNextResponder" ref="191373211"/>
						<int key="NSvFlags">274</int>
						<string key="NSFrameSize">{320, 416}</string>
						<reference key="NSSuperview" ref="191373211"/>
						<bool key="IBUIOpaque">NO</bool>
						<bool key="IBUIClipsSubviews">YES</bool>
						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
						<bool key="IBUIScrollEnabled">NO</bool>
						<bool key="IBUIBouncesZoom">NO</bool>
						<int key="IBUIStyle">1</int>
						<int key="IBUISeparatorStyle">1</int>
						<int key="IBUISectionIndexMinimumDisplayRowCount">0</int>
						<bool key="IBUIShowsSelectionImmediatelyOnTouchBegin">YES</bool>
						<float key="IBUIRowHeight">4.400000e+01</float>
						<float key="IBUISectionHeaderHeight">2.000000e+01</float>
					</object>
					<object class="IBUIImageView" id="91336409">
						<reference key="NSNextResponder" ref="191373211"/>
						<int key="NSvFlags">292</int>
						<string key="NSFrame">{{20, 276}, {200, 120}}</string>
						<reference key="NSSuperview" ref="191373211"/>
						<bool key="IBUIOpaque">NO</bool>
						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
						<int key="IBUIContentMode">1</int>
						<bool key="IBUIUserInteractionEnabled">NO</bool>
					</object>
					<object class="IBUIButton" id="323841673">
						<reference key="NSNextResponder" ref="191373211"/>
						<int key="NSvFlags">292</int>
						<string key="NSFrame">{{262, 357}, {18, 19}}</string>
						<reference key="NSSuperview" ref="191373211"/>
						<bool key="IBUIOpaque">NO</bool>
						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
						<int key="IBUIContentHorizontalAlignment">0</int>
						<int key="IBUIContentVerticalAlignment">0</int>
						<object class="NSFont" key="IBUIFont">
							<string key="NSName">Helvetica-Bold</string>
							<double key="NSSize">1.500000e+01</double>
							<int key="NSfFlags">16</int>
						</object>
						<int key="IBUIButtonType">3</int>
						<bool key="IBUIShowsTouchWhenHighlighted">YES</bool>
						<object class="NSColor" key="IBUIHighlightedTitleColor">
							<int key="NSColorSpace">1</int>
							<bytes key="NSRGB">MSAxIDEAA</bytes>
						</object>
						<object class="NSColor" key="IBUINormalTitleColor">
							<int key="NSColorSpace">1</int>
							<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
						</object>
						<object class="NSColor" key="IBUINormalTitleShadowColor">
							<int key="NSColorSpace">3</int>
							<bytes key="NSWhite">MAA</bytes>
						</object>
					</object>
				</object>
				<string key="NSFrameSize">{320, 416}</string>
				<reference key="NSSuperview"/>
				<object class="NSColor" key="IBUIBackgroundColor">
					<int key="NSColorSpace">3</int>
					<bytes key="NSWhite">MQA</bytes>
					<object class="NSColorSpace" key="NSCustomColorSpace">
						<int key="NSID">2</int>
					</object>
				</object>
			</object>
		</object>
		<object class="IBObjectContainer" key="IBDocument.Objects">
			<object class="NSMutableArray" key="connectionRecords">
				<bool key="EncodedWithXMLCoder">YES</bool>
				<object class="IBConnectionRecord">
					<object class="IBCocoaTouchOutletConnection" key="connection">
						<string key="label">view</string>
						<reference key="source" ref="372490531"/>
						<reference key="destination" ref="191373211"/>
					</object>
					<int key="connectionID">7</int>
				</object>
				<object class="IBConnectionRecord">
					<object class="IBCocoaTouchOutletConnection" key="connection">
						<string key="label">dataSource</string>
						<reference key="source" ref="810055614"/>
						<reference key="destination" ref="372490531"/>
					</object>
					<int key="connectionID">8</int>
				</object>
				<object class="IBConnectionRecord">
					<object class="IBCocoaTouchOutletConnection" key="connection">
						<string key="label">delegate</string>
						<reference key="source" ref="810055614"/>
						<reference key="destination" ref="372490531"/>
					</object>
					<int key="connectionID">9</int>
				</object>
				<object class="IBConnectionRecord">
					<object class="IBCocoaTouchOutletConnection" key="connection">
						<string key="label">actionsToDoView</string>
						<reference key="source" ref="372490531"/>
						<reference key="destination" ref="810055614"/>
					</object>
					<int key="connectionID">20</int>
				</object>
				<object class="IBConnectionRecord">
					<object class="IBCocoaTouchOutletConnection" key="connection">
						<string key="label">imageView</string>
						<reference key="source" ref="372490531"/>
						<reference key="destination" ref="91336409"/>
					</object>
					<int key="connectionID">22</int>
				</object>
				<object class="IBConnectionRecord">
					<object class="IBCocoaTouchOutletConnection" key="connection">
						<string key="label">settingsButton</string>
						<reference key="source" ref="372490531"/>
						<reference key="destination" ref="323841673"/>
					</object>
					<int key="connectionID">24</int>
				</object>
				<object class="IBConnectionRecord">
					<object class="IBCocoaTouchEventConnection" key="connection">
						<string key="label">gotoAbout:</string>
						<reference key="source" ref="323841673"/>
						<reference key="destination" ref="372490531"/>
						<int key="IBEventType">7</int>
					</object>
					<int key="connectionID">31</int>
				</object>
			</object>
			<object class="IBMutableOrderedSet" key="objectRecords">
				<object class="NSArray" key="orderedObjects">
					<bool key="EncodedWithXMLCoder">YES</bool>
					<object class="IBObjectRecord">
						<int key="objectID">0</int>
						<object class="NSArray" key="object" id="360949347">
							<bool key="EncodedWithXMLCoder">YES</bool>
						</object>
						<reference key="children" ref="1000"/>
						<nil key="parent"/>
					</object>
					<object class="IBObjectRecord">
						<int key="objectID">1</int>
						<reference key="object" ref="191373211"/>
						<object class="NSMutableArray" key="children">
							<bool key="EncodedWithXMLCoder">YES</bool>
							<reference ref="810055614"/>
							<reference ref="91336409"/>
							<reference ref="323841673"/>
						</object>
						<reference key="parent" ref="360949347"/>
					</object>
					<object class="IBObjectRecord">
						<int key="objectID">-1</int>
						<reference key="object" ref="372490531"/>
						<reference key="parent" ref="360949347"/>
						<string type="base64-UTF8" key="objectName">RmlsZSdzIE93bmVyA</string>
					</object>
					<object class="IBObjectRecord">
						<int key="objectID">-2</int>
						<reference key="object" ref="711762367"/>
						<reference key="parent" ref="360949347"/>
					</object>
					<object class="IBObjectRecord">
						<int key="objectID">23</int>
						<reference key="object" ref="323841673"/>
						<reference key="parent" ref="191373211"/>
					</object>
					<object class="IBObjectRecord">
						<int key="objectID">21</int>
						<reference key="object" ref="91336409"/>
						<reference key="parent" ref="191373211"/>
					</object>
					<object class="IBObjectRecord">
						<int key="objectID">5</int>
						<reference key="object" ref="810055614"/>
						<reference key="parent" ref="191373211"/>
					</object>
				</object>
			</object>
			<object class="NSMutableDictionary" key="flattenedProperties">
				<bool key="EncodedWithXMLCoder">YES</bool>
				<object class="NSMutableArray" key="dict.sortedKeys">
					<bool key="EncodedWithXMLCoder">YES</bool>
					<string>-1.CustomClassName</string>
					<string>-2.CustomClassName</string>
					<string>1.IBEditorWindowLastContentRect</string>
					<string>1.IBPluginDependency</string>
					<string>21.IBPluginDependency</string>
					<string>23.IBPluginDependency</string>
					<string>5.IBPluginDependency</string>
				</object>
				<object class="NSMutableArray" key="dict.values">
					<bool key="EncodedWithXMLCoder">YES</bool>
					<string>InputTableViewController</string>
					<string>UIResponder</string>
					<string>{{1036, 576}, {320, 416}}</string>
					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
				</object>
			</object>
			<object class="NSMutableDictionary" key="unlocalizedProperties">
				<bool key="EncodedWithXMLCoder">YES</bool>
				<object class="NSArray" key="dict.sortedKeys">
					<bool key="EncodedWithXMLCoder">YES</bool>
				</object>
				<object class="NSMutableArray" key="dict.values">
					<bool key="EncodedWithXMLCoder">YES</bool>
				</object>
			</object>
			<nil key="activeLocalization"/>
			<object class="NSMutableDictionary" key="localizations">
				<bool key="EncodedWithXMLCoder">YES</bool>
				<object class="NSArray" key="dict.sortedKeys">
					<bool key="EncodedWithXMLCoder">YES</bool>
				</object>
				<object class="NSMutableArray" key="dict.values">
					<bool key="EncodedWithXMLCoder">YES</bool>
				</object>
			</object>
			<nil key="sourceID"/>
			<int key="maxID">31</int>
		</object>
		<object class="IBClassDescriber" key="IBDocument.Classes">
			<object class="NSMutableArray" key="referencedPartialClassDescriptions">
				<bool key="EncodedWithXMLCoder">YES</bool>
				<object class="IBPartialClassDescription">
					<string key="className">InputTableViewController</string>
					<string key="superclassName">UIViewController</string>
					<object class="NSMutableDictionary" key="actions">
						<bool key="EncodedWithXMLCoder">YES</bool>
						<object class="NSMutableArray" key="dict.sortedKeys">
							<bool key="EncodedWithXMLCoder">YES</bool>
							<string>addPhoto:</string>
							<string>gotoAbout:</string>
							<string>gotoSettings:firstTime:</string>
						</object>
						<object class="NSMutableArray" key="dict.values">
							<bool key="EncodedWithXMLCoder">YES</bool>
							<string>id</string>
							<string>id</string>
							<string>id</string>
						</object>
					</object>
					<object class="NSMutableDictionary" key="outlets">
						<bool key="EncodedWithXMLCoder">YES</bool>
						<object class="NSMutableArray" key="dict.sortedKeys">
							<bool key="EncodedWithXMLCoder">YES</bool>
							<string>actionsToDoView</string>
							<string>imageView</string>
							<string>settingsButton</string>
						</object>
						<object class="NSMutableArray" key="dict.values">
							<bool key="EncodedWithXMLCoder">YES</bool>
							<string>UITableView</string>
							<string>UIImageView</string>
							<string>UIButton</string>
						</object>
					</object>
					<object class="IBClassDescriptionSource" key="sourceIdentifier">
						<string key="majorKey">IBProjectSource</string>
						<string key="minorKey">Classes/InputTableViewController.h</string>
					</object>
				</object>
			</object>
		</object>
		<int key="IBDocument.localizationMode">0</int>
		<string key="IBDocument.LastKnownRelativeProjectPath">FixMyStreet.xcodeproj</string>
		<int key="IBDocument.defaultPropertyAccessControl">3</int>
		<string key="IBCocoaTouchPluginVersion">3.0</string>
	</data>
</archive>